[logback-user] I'm getting the "substitute logger" error message yet my appender still works
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.
On Mon, Oct 24, 2011 at 8:33 AM, Paul Gifford <pggifford at gmail.com> wrote:
> 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?
> Logback-user mailing list
> Logback-user at qos.ch
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user