You get this error because your Appender, or one of its dependencies, uses SLF4J for logging and that creates a recursive configuration problem for SLF4J/Logback - you need access to the logging context before the current logging context has been fully constructed. SLF4J solves this by giving the Logger a minimal logging context that won't log. Interestingly, I encountered the same problem in my work on Log4j 2.0 and was able to solve it in a different manner so that the subordinate Logger will work properly after the LoggerContext is fully configured.<div>
<br></div><div>The only concern here is if you really need logging to function within the components being set up during the construction of the Appender.</div><div><br></div><div>Ralph<br><br><div class="gmail_quote">On Mon, Oct 24, 2011 at 8:33 AM, Paul Gifford <span dir="ltr"><<a href="mailto:pggifford@gmail.com">pggifford@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Hi,</div>
<div> </div>
<div> I've written a custom appender that extends AppenderBase<ILoggingEvent> and put it in a library. I have a webapp that uses the custom appender. When I deploy that webapp to Tomcat I get the SLF4J error message "The following loggers will not work because they were created during the default configuration phase of the underlying logging system." The loggers listed are my custom appender plus the Spring JDBC classes the appender depends on (my appender logs to a table).</div>
<div> </div>
<div> My appender, however, works just fine. I get entries in my table just as expected.</div>
<div> </div>
<div> Is this error message something to be concerned about or am I receiving it in error?</div>
<div> </div>
<div>Thanks,</div>
<div> </div><font color="#888888">
<div>Paul</div>
<div> </div>
</font><br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>