[logback-user] ignoring logback.xml files embedded in other jars

Marshall Pierce marshall at mpierce.org
Thu Nov 15 17:15:43 CET 2012


You can also use http://logback.qos.ch/manual/configuration.html#configFileProperty. I generally use a config file named '{app name}-logback-config.xml' or something like that and specify it with that property to avoid this sort of problem.

-Marshall

On Nov 15, 2012, at 5:21 AM, Thorbjørn Ravn Andersen <thunderaxiom at hotmail.com> wrote:

> Please see
> http://logback.qos.ch/manual/configuration.html#auto_configuration
> 
> Item 3 is what the jar provides, so you just need item 1 or item 2 to
> succeed.  The easiest is renaming your logback.xml to logback-test.xml
> 
> Best regards,
> 
> /Thorbjørn
> 
> -----Original Message-----
> From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On
> Behalf Of Sebastian Esponda
> Sent: 15. november 2012 00:30
> To: logback-user at qos.ch
> Subject: [logback-user] ignoring logback.xml files embedded in other jars
> 
> Hello,
> 
> We are developing a web application that has its logging configuration under
> /classes. Unfortunately, we depend on another JAR (which we can't modify)
> which also has a its own logback.xml file.
> During the startup process logback detects and uses both files. Is there any
> way to set it up so that the one included in the JAR is ignored?
> 
> Thanks,
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user



More information about the Logback-user mailing list