Collisions between primary and included configuration files

Our main logback.xml file is jarred up with our application. We'd like to be able to have an "override file" in which we could simply specify the settings we wanted to be different than the main file. I thought about using the file inclusion feature to include the override file from the main config, but the manual doesn't describe the behavior when the included file and the primary file have conflicting settings (for example a logger level). Any ideas on how to accomplish this? Thanks!

On 27/05/2010 3:03 PM, Becker, Thomas wrote:
Our main logback.xml file is jarred up with our application. We’d like to be able to have an “override file” in which we could simply specify the settings we wanted to be different than the main file. I thought about using the file inclusion feature to include the override file from the main config, but the manual doesn’t describe the behavior when the included file and the primary file have conflicting settings (for example a logger level). Any ideas on how to accomplish this? Thanks!
The last instruction wins. So, if the override file is included last in logback.xml, the instructions of the override file will win. HTH, -- Ceki

Thanks a lot! Might be a good idea to add that to the manual. -----Original Message----- From: Ceki Gülcü [mailto:ceki@qos.ch] Sent: Thursday, May 27, 2010 9:07 AM To: logback users list Subject: Re: [logback-user] Collisions between primary and included configuration files On 27/05/2010 3:03 PM, Becker, Thomas wrote:
Our main logback.xml file is jarred up with our application. We'd like to be able to have an "override file" in which we could simply specify the settings we wanted to be different than the main file. I thought about using the file inclusion feature to include the override file from the main config, but the manual doesn't describe the behavior when the included file and the primary file have conflicting settings (for example a logger level). Any ideas on how to accomplish this? Thanks!
The last instruction wins. So, if the override file is included last in logback.xml, the instructions of the override file will win. HTH, -- Ceki _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user

One more question on this. I'd like to be scan the included file for changes. I tried enabling scanning on the main file, as well as adding a scan attribute to the <include> element but neither of those works. Is this something you'd consider adding? The scanning is a good feature, but doesn't help when the file is jarred up, which I'd assume is fairly common. -----Original Message----- From: Ceki Gülcü [mailto:ceki@qos.ch] Sent: Thursday, May 27, 2010 9:07 AM To: logback users list Subject: Re: [logback-user] Collisions between primary and included configuration files On 27/05/2010 3:03 PM, Becker, Thomas wrote:
Our main logback.xml file is jarred up with our application. We'd like to be able to have an "override file" in which we could simply specify the settings we wanted to be different than the main file. I thought about using the file inclusion feature to include the override file from the main config, but the manual doesn't describe the behavior when the included file and the primary file have conflicting settings (for example a logger level). Any ideas on how to accomplish this? Thanks!
The last instruction wins. So, if the override file is included last in logback.xml, the instructions of the override file will win. HTH, -- Ceki _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
participants (2)
-
Becker, Thomas
-
Ceki Gülcü