Re: Configuring Tomcat to use log4j2 - not working, probably a, trivial error in log4j2.xml

Bruno Melloni <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <[email protected]>
Update:

So, I had got it to work by putting the following code in catalina.bat.
Then based on the recommendations on this thread I removed it from
catalina.bat and created a setenv.bat with the exact same lines.

rem LOG4J config
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\log4j2\lib\log4j-api-2.17.1.jar"
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\log4j2\lib\log4j-core-2.17.1.jar"
set
"CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\log4j2\lib\log4j-appserver-2.17.1.jar"
set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\log4j2\conf"

Works like a charm from the command line but gets ignored when launched
as a windows service.

I could not find the syntax for adding things (like log4j) to the
classpath on tomcat9w, does anybody know what it is?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.