[logback-user] dynamically change logging thesholds
Norbert Kiesel
nkiesel at MetricStream.com
Wed Feb 9 01:46:01 CET 2022
Hi,
we often need to change log level thresholds to investigate a problem in a running system. Right now, we do that by using
<configuration scan="true" scanPeriod="30 seconds">
and then editing the logback.xml file by hand (i.e. using a text editor or Sed or Perl). I wonder if there is a better way to accomplish this. I know that we can e.g. use
<root level="${rootLevel}"/>
but what I do not yet understand is:
1. Can I modify the value if this variable via some Java API from within my application?
2. Do we still need the scan="true" attribute or will the "rootLevel" variable be evaluated every time the logger is used?
3. Is there a measurable performance impact by using variables in that manner?
</nk>
---
[MetricStream]<http://www.metricstream.com/>
Norbert Kiesel | Chief Architect
[https://assets.metricstream.com/lp/email-signature-mail-icon-grey.png] nkiesel at metricstream.com<mailto:nkiesel at metricstream.com>
[https://assets.metricstream.com/lp/email-signature-mobile-icon-grey.png] +1-650-620-2955 [https://assets.metricstream.com/lp/email-signature-phone-icon-grey.png] +1-650-620-2955
www.metricstream.com<https://www.metricstream.com/>
[Linkedin]<https://www.linkedin.com/company/metricstream> [Facebook] <https://twitter.com/metricstream> [Twitter] <https://www.facebook.com/MetricStream> [youtube] <https://www.youtube.com/user/MetricStream>
[https://assets.metricstream.com/lp/meticstream-email-signature-stream-bg.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20220209/6c4e1a3b/attachment.html>
More information about the logback-user
mailing list