<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Hi</span><div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
I would like to handle logback configuration programmatically - without files (XML, Groovy, etc).</div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
My problem is that I cant find an obvious way to override the fallback behavior in ContextInitializer.autoConfig, which ultimately result that a ConsoleAppender is created by BasicConfigurator (since no URL was found for Joran).</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">It would be nice to if BasicConfigurator could be replaced for something else, maybe using <a href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html" target="_blank">http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html</a> or something similar.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Maybe adding an modified copy of BasicConfigurator (but with same fully qualified classname) first on classpath would be possible? But this feels more like a hack.</div>
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px"><br></div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">Cheers,</div><div style="font-family:arial,sans-serif;font-size:13.333333969116211px">
-Kristoffer</div></div>