Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Description
Just like logback-classic does for normal logs.
At the first glance the base class (AsyncAppenderBase) looks like it can be used with access logs - it is not an abstract one and nothing hints it should not. But that class misses a call to event object's prepareForDeferredProcessing method so is not good for Jetty that can recycle the request objects.
The implementation is straightforward:
import ch.qos.logback.access.spi.IAccessEvent; import ch.qos.logback.core.AsyncAppenderBase; public class AsyncAccessAppender extends AsyncAppenderBase<IAccessEvent> { @Override protected void preprocess(final IAccessEvent eventObject) { eventObject.prepareForDeferredProcessing(); } }