Hi I'm trying to configure a repository using multiple log4j configuration file (properties or xml format). I've read previous posts from 2002 and 2003 on the subject which confirmed that this should possible. As additional configuration is read, Loggers and appenders are added to the Repository without resetting the previous configuration. That works all fine and dandy.
My problem is that loggers can't reference appender in a different configuration file, even if the referenced appender has already been configured in the repository. Example: I have a "root" log4j configuration which defines the root logger and a single "common" appender "commonApppender". This configuration is loaded first. Think server startup. Then I have another specialized log4j configuration file which defines another appender "appenderA" plus a logger "foo". Think of this as application specific log4j configuration file. This "foo" logger is attached to both "commonApppender" and "appenderA". However, when the configuration file is read in, log4j prints a warning stating it cannot find "commonApppender" in the configuration. And of course no logging goes to "commonApppender" from logger "foo" Is there a way of getting log4j to do some sort of lazy resolving of components such that this sort of cross-configuration file referencing is possible? Or should this actually work, but I'm just doing it wrong? The "root" configuration is loaded through auto discovery, and the specialized or application configuration is loaded like this: ----- Properties props = ... //getting specialized log4j properties file PropertyConfigurator.configure(props); ------------- I've also tried the nonstatic method of doConfigure, no change. thanks, Henrik Bentel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
