<div dir="ltr">Just google <a href="https://www.baeldung.com/spring-boot-changing-log-level-at-runtime">https://www.baeldung.com/spring-boot-changing-log-level-at-runtime</a> . Hope it can help you</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Norbert Kiesel <<a href="mailto:nkiesel@metricstream.com">nkiesel@metricstream.com</a>> 于2020年12月9日周三 下午1:28写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div>
<div style="font-family:Tahoma,Geneva,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Tahoma,Geneva,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Tahoma,Geneva,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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!</div>
<div style="font-family:Tahoma,Geneva,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Tahoma,Geneva,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_8459719927150986685Signature">
<div>
<div></div>
<div id="gmail-m_8459719927150986685divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Tahoma,Geneva,sans-serif">
<div name="divtagdefaultwrapper">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><span lang="en-US">
<div style="margin:0px" align="justify"><font size="2" face="Arial,sans-serif"><span style="font-size:10pt"><font size="3" face="Calibri,sans-serif" color="#17365D"><span style="font-size:12pt"></nk><br>
<br>
---<br>
</span></font></span></font></div>
<div style="margin:0px" align="justify"><font size="2" face="Arial,sans-serif"><span style="font-size:10pt"><font size="3" face="Calibri,sans-serif" color="#17365D"><span style="font-size:12pt"><br>
</span></font></span></font></div>
<div style="margin:0px" align="justify"><font size="2" face="Arial,sans-serif"><span style="font-size:10pt"><font size="3" face="Calibri,sans-serif" color="#17365D"><span style="font-size:12pt">
<div>
<table style="font-family:Calibri,Verdana,Arial,sans-serif;color:rgb(128,130,136);font-size:11px;text-align:left" width="500" height="125" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2" valign="top" height="8" align="left">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="100%" valign="top" bgcolor="#FFFFFF" align="left"><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="color:rgb(128,130,136);font-size:1em;padding-top:10px;line-height:16px;padding-left:5px;font-family:Calibri,Verdana,Arial,sans-serif" width="75%" valign="top">
<span style="font-family:Calibri,Verdana,Arial,sans-serif;color:rgb(11,110,185);font-size:16px">Norbert Kiesel</span><br>
Systems Architect, Engineering<br>
E: <a href="mailto:sonia.sharma@metricstream.com" title="Ctrl+Click or tap to follow the link" target="_blank">
nkiesel@metricstream.com</a><br>
W: <a>www.metricstream.com</a></td>
<td style="font-family:Calibri,Verdana,Arial,sans-serif;color:rgb(0,110,184);padding-bottom:5px" width="25%" valign="bottom" align="center">
<br>
</td>
</tr>
<tr>
<td colspan="2" valign="top" align="right">
<table width="100%" height="5" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="100%" valign="top" bgcolor="#FFFFFF" align="right"><br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</span></font></span></font><font size="2" face="Arial,sans-serif"><span style="font-size:10pt"><font size="3" face="Calibri,sans-serif" color="#17365D"><span style="font-size:12pt"></span></font></span></font></div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
logback-user mailing list<br>
<a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a></blockquote></div>