[logback-user] Is there System properties configuration?

Ceki Gulcu listid at qos.ch
Sat Oct 13 18:49:27 CEST 2007



There are no such plans. At this time, we try to offer only features users 
actually ask for. On the long term, this is beneficial for both developers and 
users. Less code to maintain for us and easier for users to grasp the library 
(less things to learn).


thebugslayer wrote:
> this will work.
> 
> Is there plan to add user specifiy config file in the future? I found
> that is easier to instruct end user rather than affecting classpath.
> 
> Thanks.
> -zemian
> 
> 
> On 10/13/07, Ceki Gulcu <listid at qos.ch> wrote:
>> Thank you for your answer. As things stand currently, you can't do that using
>> logback except by modifying the class path. As in
>>
>> java -cp ../resources1/;otherClasspathEntries -jar mytool.jar
>> java -cp ../resources2/;otherClasspathEntries -jar mytool.jar
>> java -cp ../resources3/;otherClasspathEntries -jar mytool.jar
>>
>> In addition, you would need to place customN.xml in resourceN/logback.xml, where
>> N is in {1, 2, 3}.
>>
>> Would that work for you?
>>
>>
>> thebugslayer wrote:
>>> Hi Ceki,
>>>
>>> This feature was in log4j, and it allow me  to publish tool that allow
>>> end user do this:
>>>
>>> java -Dlog4jconfiguration=custom1.xml -jar mytool.jar
>>> java -Dlog4jconfiguration=custom2.xml -jar mytool.jar
>>> java -Dlog4jconfiguration=custom3.xml -jar mytool.jar
>>>
>>> how would I do this in logback?
>>> -Z
>>>
>>>
>>> On 10/13/07, Ceki Gulcu <ceki at qos.ch> wrote:
>>>> Hello,
>>>>
>>>> No, it is not currently possible to specify the name of the configuration file
>>>> through a system property. Could you please describe your use case?
>>>>
>>>> Cheers,
>>>>
>>>> thebugslayer wrote:
>>>>> Hi,
>>>>>
>>>>> I read http://logback.qos.ch/manual/joran.html, it's only checking
>>>>> classpath for config logback.xml file. Is there a way to specify file
>>>>> location by System properties?
>>>>>
>>>>> Thanks,
>>>> --
>>>> Ceki Gülcü
>>>> Logback: The reliable, generic, fast and flexible logging framework for Java.
>>>> http://logback.qos.ch
>>>> _______________________________________________
>>>> Logback-user mailing list
>>>> Logback-user at qos.ch
>>>> 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
>> Logback-user at qos.ch
>> 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



More information about the Logback-user mailing list