<html><head></head><body bgcolor="#FFFFFF"><div>Not really - setting a level is implementation specific, a valid SLF4J implementation might not even allow setting levels on a Logger. A library should not be doing it anyway - what level of messages the end application is interested in doing something with should be the business of the end application, not the library. </div><div><br></div><div>If it's the end application code that wants to dynamically set the level then that bit of code should be ported to whatever SLF4J implementation you are planning on using.</div><div><br></div><div>Rob</div><div><br></div><div>On 7 Jan 2013, at 14:16, Mark Petrovic <<a href="mailto:mspetrovic@gmail.com">mspetrovic@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">[Originally posted on 12/26/2012, but it apparently did not make it to the list archives. msp]</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Hi. Thank you for SLF4J and Logback.</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
I have this line of code that just today came in from an upstream dependency out of my control:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<div> private static final Logger logger = Logger.getLogger(FooImpl.class);</div><div> static {</div><div> logger.<span class="" style="background-color:rgb(255,255,204)">setLevel</span>(<span class="" style="background-color:rgb(255,255,204)">Level</span>.DEBUG); <<<<<<<<<<<<<<<<</div>
<div> }</div><div><br></div><div>Unfortunately, this is logging code I had been successfully bridging, but this <span class="" style="background-color:rgb(255,255,204)">setLevel</span>() call on a Log4J logger breaks it.</div>
<div><br></div><div>Do I have any elegant recourse beyond asking the developers of the line of code to not do this? </div><div><br></div><div>Thanks.</div></div><div><br></div>-- <br>Mark
</div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Logback-user mailing list</span><br><span><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a></span><br><span><a href="http://mailman.qos.ch/mailman/listinfo/logback-user">http://mailman.qos.ch/mailman/listinfo/logback-user</a></span></div></blockquote></body></html>