Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Description
Currently both logback event classes (LoggingEvent and AccessEvent) are implementing the method prepareForDeferredProcessing(). To allow calling this method for both event types from within a logback-core appender (e.g. the one suggested in LBCLASSIC-177) this method has to be defined within a logback-core interface.
Additionally the method prepareForDeferredProcessing() should support two behaviors:
1) preparing only the "cheap" stuff like thread name or MDC
2) preparing everything including the "expensive" stuff like caller data -> this would solve LBCLASSIC-175
So how about defining an interface like the following?
package ch.qos.logback.core.spi;
public interface Event
{ void prepareForDeferredProcessing(boolean doFullPreparation); }Maybe the method getTimeStamp() implemented by both event types could be part of this interface as well.