I need something like this:
\"param name=\"File\" value=\"${CATALINA_HOME}/logs/log4j.log\"
I saw a lot of similar questions, but there is no working solutions
You can do the following:
CATALINA_HOME
as an environment variable using -D
option. You just have to run set JAVA_OPTS=%JAVA_OPTS% -DCATALINA_HOME=%CATALINA_HOME%
if you are on windows or
export JAVA_OPTS=${JAVA_OPTS} -DCATALINA_HOME=$CATALINA_HOME
for unix.
Now just use ${CATALINA_HOME} into your log4j configuration file and this should work.