tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Kolinko" <>
Subject Re: misconfigured log4j issue
Date Sun, 03 Feb 2008 17:06:46 GMT
> Yes.  I manage the log4j configuration myself when my webapp loads -
> from a props file - I'm not using any of log4j's auto configure /
> discovery stuff.

Tomcat uses commons-logging for its logging needs. Apache commons
logging does decide what logging implementation to use at the time
when a class is loaded. If log4j is reachable through the current
thread classloader, it will be used. And the first time log4j is
accessed, it configures itself. In this case it searches for or log4j.xml in your app's classes folder or
somewhere else from where classes are loaded.

> I configure log4j before I use it.  But, maybe its possible that since
> my webapp is providing log4j, tomcat is trying to use log4j for
> something in my webapp before I have it configured?

Yes. You may want to dig into commons logging for more details.

> Maybe I need to put some sort of junk log4j config file in my
> classpath to make log4j toss out any messages that occur before my
> code had a chance to configure log4j, if this is the case.

May be. I do not have experience of reconfiguring log4j on the fly.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message