[logback-user] I'm getting the "substitute logger" error message yet my appender still works
ralph.goers @dslextreme.com
rgoers at apache.org
Mon Oct 24 18:24:16 CEST 2011
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.
The only concern here is if you really need logging to function within the
components being set up during the construction of the Appender.
Ralph
On Mon, Oct 24, 2011 at 8:33 AM, Paul Gifford <pggifford at gmail.com> wrote:
> Hi,
>
> 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).
>
> My appender, however, works just fine. I get entries in my table just
> as expected.
>
> Is this error message something to be concerned about or am I receiving
> it in error?
>
> Thanks,
>
> Paul
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20111024/10be10cf/attachment.html>
More information about the Logback-user
mailing list