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 <[email protected]> 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
> [email protected]
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to