Quoting Lukas Bradley <[EMAIL PROTECTED]>: > > Does Tomcat 4.1.24 initialize a Log4J instance? It seems as if something > is > > stepping on my Log4J properties, and I don't know where it is. The first > > thing my application does is start the plugin, but here is my log: > > It's actually Commons Digester. When I set it to a DEBUG level, it goes > CRAZY on the log. > > Is there any way to ensure that my log properties get set before Digester > starts? >
That Depends. Where do you have Log4j; in common/lib, WEB-INF/lib, or both? Is digester in your WEB-INF/lib or is it Tomcat's copy of digester which reads the server.xml and other xml config files? Note that the trouble is usually the fault of commons-logging which messes things up significantly. Do you have commons-logging in your WEB-INF/lib? Bottom line is that, if you want Log4j logging to work properly, make sure log4j.jar is in WEB-INF/lib. Then, nothing else will step on your configuration except for, possibly, other 3rd party libraries in WEB-INF/lib that perform Log4j configuration (which is a big no, no...general libraries shouldn't be performing Log4j configuration, they should leave that to your application). Put your config file in WEB-INF/classes for default log4j configuration or put it wherever and load it yourself. I suggest using a servlet context listener to load configuration upon startup. Anway, until you detail the setup of your application, I can't tell you much more. BTW, you really should remove Xerces from WEB-INF/lib. This should be loaded from common/lib. The explanation has been detailed on the list many times before so I won't go into it. Jake > Lukas > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
