On Tue, 2005-07-26 at 09:49 -0700, Mark Palmer wrote: > My code and needs to be common/lib (i.e. don't want to > modify the web application war file in any way) > > This means log4j needs to be in common/lib as well.
This is more of a user question (and a FAQ really), but here's an idea I'd like to share that's somewhat related. You can add a custom appender from a classloader that log4j doesn't see upon start-up by first loading the base "generic" configuration, and when your model boots, add the appender to the category/logger tree, e.g. Logger.getRootLogger().addAppender(new MyWarFileAppender()) But this gets hard to configure. So, it would be nice to have a model that allows you to "merge" a log4j.xml file with an existing configuration. So, you could have: log4j.xml (base) log4j-custom.xml (gets loaded by a servlet) And declared categories/appenders etc. would be overlaid onto an existing configuration rather than replacing the existing configuration outright. And maybe people wouldn't feel as compelled to bundle log4j.jar into every .war deployment... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
