[logback-user] Attach custom Logback appenders after configuration reload

Thaya Nathan kthaya24 at gmail.com
Wed Mar 16 08:52:36 CET 2022


Hi Team,



We have been migrating from Log4j 1 to Logback and we have few custom
appenders like below:

*public class CustomAppender extends AppenderBase<ILoggingEvent> implements
Runnable {}*



Those attach to ch.qos.logback.classic.Logger using addAppender method when
application starts.



All these programmatically created appenders are removed when the Logback
configuration file (logback.xml) changed/reloaded. How can we re attach
those appenders back to Logger without application restart?



Thanks,

Thaya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20220316/0856854e/attachment.html>


More information about the logback-user mailing list