I have an app on jboss which logging through log4j. When I running my server through bat file (standalone.bat) logs work, but there is a problem under standalone.sh file. Here is how I set JAVA_OPTS in standalone.bat:
set "JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration=file:../standalone/configuration/log4j.xml"
and it works. How should I do this in standalone.sh file? I tried something like this:
JAVA_OPTS= "$JAVA_OPTS -Dlog4j.configuration=file:$JBOSS_HOME/standalone/configuration/log4j.xml"
But it doesn't work. Any ideas? Thanks in advance for your help.
standalone.conf
instead of*.sh
? Add your custom entries at the end of *.conf file. Something likeJAVA_OPTS= "$JAVA_OPTS -Dlog4j.configuration=file:../standalone/configuration/log4j.xml"
should work fine. – Maddock