[logback-user] Reconfiguring a sifting appender
Mayfield, Rich
Richard_Mayfield at bmc.com
Mon Feb 20 19:07:34 CET 2012
Our application includes the ability to change certain logging parameters – e.g. Alter the size of each log file, the number of backup files in a rolling appender, the file name, etc.
I can do this with FileAppender and RollingFileAppender, and I can do this with appenders already created with a SiftingAppender as SiftingAppender provides access to any live appenders.
What I cannot seem to do is reconfigure a SiftingAppender so that any new appenders it creates will have the new configuration. SiftingAppender stores a list of SAXEvent objects representing the appender configuration in the AppenderFactory, however access to the factory and configuration appears to be private.
Am I missing something? Other than re-implementing a more open, re-configurable SiftingAppender is there a better way?
Thanks much for your help.
More information about the Logback-user
mailing list