[logback-user] Changing logback configurations programatically

Steve Cohen scohen at javactivity.org
Tue Jul 24 19:45:04 CEST 2012


With the scan option logback can change its configuration on the fly.

I would like to take this one step further by adding to my Java Swing 
application that uses logback, a facility through which the user could 
specify a logging configuration at the direction of technical personnel, 
within the application's user interface, to change logging configuration 
without having to copy files, etc.  The user would just
indicate that they wanted "configuration 4" for example and it would happen.

This would be implemented by the program writing a file to the place 
where the program had specified the configuration to live.  I could 
obviously do this by reading the system property 
logback.configurationFile.  Is there another way?  Is there an API that 
provides this information?

+





More information about the Logback-user mailing list