Well, IMHO, a file that includes other files would not be simpler.
It seems much simpler to for me to create 3 bat/sh files that do: foo-trace.bat: java -Dch.qos.logback.config=foo/bar/logback-trace.xml Foo foo-debug.bat: java -Dch.qos.logback.config=foo/bar/logback-debug.xml Foo foo.bat: java Foo I might be misunderstanding your file inclusion idea. Is Joran a part of Logback? If so, it introduces a dependency on Logback, which using slf4j is supposed to alleviate. For some background, I am developing a project (www.sf.net/projects/ohla) that has both a library (for clients) and an executable (server). Thanks, Michael -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ceki Gülcü Sent: Thursday, February 08, 2007 2:51 PM To: logback users list Subject: RE: [logback-user] add property for specifying logback.xmlfilelocation Hi Michael, What you propose makes sense. However, I'd like to limit the number of ways logback can be configured (to ease the brain-footprint of logback on our users.) How about if we allowed a config file to include parts from a different sources? This inclusion feature should allow you to reference a different file. Moreover, since Joran supports variable substitution, you could set the value of the variable through a system property. You would get the feature you are asking for, and we would keep the initialization procedure simple (err, simpler.). WDYT? If you agree, could you please file a bug report asking for inclusion feature in joran/logback? At 07:08 PM 2/8/2007, Newcomb, Michael-P57487 wrote: >If I have multiple tests that measure performance, debugging, vs. ??? I >don't want to change the file or have duplicate files in different directories. > >Look at the logback examples directory. >logback-0.9\logback-examples\src\main\java\chapter2\ > >There are 3 different configuration files. I don't want any code >dependencies on Logback so the only way to configure logback is to use >a file called logback.xml or logback-test.xml. > >To execute chapter 2 I would have to copy those files to logback.xml or >logback-test.xml. Or put them in different directories and rename them >all to the same file name. > >Thanks, >Michael > >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >On Behalf Of Sebastien Pennec >Sent: Thursday, February 08, 2007 12:36 PM >To: logback users list >Subject: Re: [logback-user] add property for specifying logback.xml >filelocation > >Hello Michael, > >At the moment, logback can load two different files: logback.xml and >logback-test.xml. They need to be in the classpath and can be useful to >separate the environments, e.g. development and production. > >This behavior is usually enough for many situations. > >Can you precise your request with a use case that would need a java >variable and would not be possible with the actual behavior? > >Thanks, > >Sébastien > > >Newcomb, Michael-P57487 wrote: > > e.g.: > > -Dch.qos.logback.config=foo/bar/my-logback.xml > > > > Thanks, > > Michael > > > > > > -------------------------------------------------------------------- > > -- > > -- > > > > _______________________________________________ > > Logback-user mailing list > > [email protected] > > http://qos.ch/mailman/listinfo/logback-user > >-- >Sébastien Pennec >[EMAIL PROTECTED] > >Logback: The reliable, generic, fast and flexible logging framework for Java. >http://logback.qos.ch/ >_______________________________________________ >Logback-user mailing list >[email protected] >http://qos.ch/mailman/listinfo/logback-user >_______________________________________________ >Logback-user mailing list >[email protected] >http://qos.ch/mailman/listinfo/logback-user -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch _______________________________________________ Logback-user mailing list [email protected] http://qos.ch/mailman/listinfo/logback-user _______________________________________________ Logback-user mailing list [email protected] http://qos.ch/mailman/listinfo/logback-user
