
Hello Anders, Could you describe your environment more precisely? We may solve your situation with features that are already available in logback. Would the ContextSelector[1] help in your case? With the ContextSelector, you can specify a name for each of your applications' context and the name of the configuration file they should use. It uses JNDI to ensure that all applications are in a separate environment. Cheers, Sébastien [1]http://logback.qos.ch/manual/contextSelector.html Anders Wallgren wrote:
I see the value in simple and very straightforward rules for configuration. However, this is seems too restrictive.
In my case, I have several components in a test infrastructure that run out of the same classpath but use different logging configurations. Currently, I use the log4j.configuration system property to specify the configuration to use when each component is started.
How would I achieve this using logback?
anders
Sébastien Pennec wrote:
Hello Jens,
Logback uses a configuration policy that follows three steps:
1. Check if a logback.xml file is found. 2. If step 1 fails, check if a logback-test-xml file is found 3. If step 2 fails, auto-configure itself with a basic ConsoleAppender.
-- Sébastien Pennec sebastien@qos.ch Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch/