Robert Bowen wrote:
I have been scouring the list and have found a few mentions of how to maintain
two seperate log files but I can't find examples and in any case what I would
like to do is something a little different although I'm sure easy to do.
My app spits out all kinds of info in a certain, precise format. Tomcat
startup/shutdown and Java exceptions are sneaking into my log. I would like
tobe able to have all non-app messages go to one log, and app messages to
another.
So, you've placed log4j jar somewhere where Tomcat itself finds it (and
as Tomcat uses Jakarta commons-logging, the commons-logging configures
itself to use log4j whenever it finds log4j classes on the classpath).
Two solutions:
- move log4j jar somewhere where it doesn't end up in Tomcat framework
classpaths, but only in webapp classpaths
see: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
- if you don't use commons-logging in your own code, configure
commons-logging to use some other logging implementation than log4j
see:
http://jakarta.apache.org/commons/logging/commons-logging-1.0.2/docs/api/org/apache/commons/logging/package-summary.html
For the first, you could move log4j jar out of the classpath, somewhere
where it is found by the shared classloader.
For the second, you need to add a system property
org.apache.commons.logging.Log to Tomcat startup with the value
specifying your desired Tomcat logging implementation.
--
..Juha
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]