logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Capturing OC4J logging
Date Mon, 12 Sep 2005 14:05:18 GMT
Quoting Michael A Chase <mchase@ix.netcom.com>:

> I'm not at work now so I don't have the exact version information, but I
> don't think it matters much.
> We are running a web application under OC4J which provides logging via a
> ServletContext com.evermind.http.Application.  We've converted all our
> code to use log4j, but we are still seeing errors from lower level code
> going to the original log file.
> Can anyone point me to some way to capture the logging done via
> (ServletContext).log() so everything can go through log4j?

Grab the LOG4J_SANDBOX_ALPHA3 tag of the logging-log4j-sandbox and build
yourself to get the ServletContextLogAppender, compatible with Log4j-1.2.xx
(HEAD compatible with Log4j-1.3... to the best of my recollection).


Note that this doesn't always seem to work well (or at all) in an environment
that does parent-first classloading and/or log4j.jar isn't stored in each
individual webapp along with parent-last classloading (such as Tomcat).  So, if
you deploy log4j-sandbox.jar and log4j.jar in each webapp's WEB-INF/lib along
with parent-last classloading, this should work pretty well for you.  Make sure
to test this yourself before assuming it will work in your environment. 
Consider this the reason why it is still in the sandbox rather than log4j


> --
> Mac :})
> Give a hobbit a fish and he eats fish for a day.
> Give a hobbit a ring and he eats fish for an age.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message