[logback-user] Advice for dynamically adding loggers

haobo liu lhbazazazv at gmail.com
Wed Dec 9 08:29:08 CET 2020

Just google
https://www.baeldung.com/spring-boot-changing-log-level-at-runtime . Hope
it can help you

Norbert Kiesel <nkiesel at metricstream.com> 于2020年12月9日周三 下午1:28写道:

> Hi,
> I want to dynamically add (and eventually remove again) loggers to a
> system.  The idea is that based on specific events (e.g. a flag in a HTTP
> REST request header), the logs for this request are written to a separate
> file (in addition to writing to the usual log file).  I also want to modify
> the log-level for this request to TRACE - ideally just for the messages
> written to the dedicated log file.  Is configuring a SiftingAppender the
> correct approach for that? And does anyone have some sample code they could
> share?  Any help/feedback is greatly appreciated!
> </nk>
> ---
> Norbert Kiesel
> Systems Architect, Engineering
> E: nkiesel at metricstream.com <sonia.sharma at metricstream.com>
> W: www.metricstream.com
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20201209/24046186/attachment.html>

More information about the logback-user mailing list