Thanks for your response. First, I didn't realize that the XML include mechanism worked with log4j yet. I will give that a try and see if I can get it working. Do you know if it should work with version 1.2.9 - I know the current version is 1.2.14 but I'm stuck with the older version right now. Also, is the XML provided for the app_log4j.xml file?
Second, from reading the mailing list it seemed that if a logger "foo.bar" was setup by one Configuration, then a second Configuration modified " foo.bar" in any way that all previous appenders would be closed and removed. I just need to be able to guarantee that additional configuration can be applied to a logger without affecting anything already done - I'm about 100% sure that this case will occur in my setup. Matt On 7/20/07, Curt Arnold <[EMAIL PROTECTED]> wrote:
You should have to options that should work out of the box. I don't understand your needs enough to suggest which one would work better. First, DOMConfiguration.configure and PropertyConfigure.configure do not reset the configuration before loading the configuration file. This basically means that if you explicitly call configure for both files, it is as if you have combined them into one file. Second, XML has an built-in "include" mechanism called external entities. Earlier versions of log4j had a problem that kept it from working, but you could use this to construct a configuration from multiple modules. Something like: <!DOCTYPE log4j:configuration SYSTEM 'log4j.dtd' [ <!ENTITY base_config SYSTEM 'base_config.xml'> ]> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <!-- include base configuration --> &base_config; <!-- custom configuration goes here --> </log4j:configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
