At 12:10 AM 12/10/2005 +0000, you wrote: >I have a class A which does DOMConfigurator.configure(file A) > > >Then in the same JVM class B does DOMConfigurator.configure(file B) > >Is this valid? > > >Would the 2nd iteration overwrite the log config of class A? >
Sort of. The configuration is actually additive. It very well may be a bit unpredictable, but one configuration does not, technically, "blow away" another configuration in a logger repository. They basically merge. That said, you should probably not being performing a configure() in your classes. Either let Log4j initialize things for you in the LogManager's static initializer (put log4j.xml or log4j.properties in the default package, with the former being read in preference to the latter) or do a configure in a class that kicks everything off such as your Main class or something like a ServletContextListener. Basically, you want it to be something that runs once and never again during the existence of the classloader.
Jake --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
