[logback-user] Can AsyncAppenders be used with logback access?

ceki ceki at qos.ch
Wed May 1 19:52:43 CEST 2013


Contrary to logback-classic, there is no AsyncAppender class in 
logback-access. Please file a jira issue requesting this feature for 
logback-access.

On 01.05.2013 19:40, Roberto Ferreras wrote:
> After setting up AsyncAppenders for the application log, I tried to use
> them on the request log (I am using Jetty) and I get this exception:
>
> 13:19:56,792 |-ERROR in
> ch.qos.logback.classic.AsyncAppender[async-request] - Appender
> [async-request] failed to append. java.lang.ClassCastException:
> ch.qos.logback.access.spi.AccessEvent cannot be cast to
> ch.qos.logback.classic.spi.ILoggingEvent
>      at java.lang.ClassCastException:
> ch.qos.logback.access.spi.AccessEvent cannot be cast to
> ch.qos.logback.classic.spi.ILoggingEvent
>      at     at
> ch.qos.logback.classic.AsyncAppender.preprocess(AsyncAppender.java:28)
>      at     at
> ch.qos.logback.core.AsyncAppenderBase.append(AsyncAppenderBase.java:129)
>      at     at
> ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88)
>
>      at     at
> ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48)
>
>      at     at
> ch.qos.logback.access.jetty.RequestLogImpl.log(RequestLogImpl.java:142)
>
> Later I have found at the docs "AsyncAppender logs ILoggingEvents
> asynchronously", so it seems that they can't be used with logback
> access, is that correct?
>
> Thanks.
>


-- 
Ceki
65% of statistics are made up on the spot


More information about the Logback-user mailing list