[logback-dev] RFC: LoggingEvent redesign
Ceki Gulcu
ceki at qos.ch
Wed Feb 25 19:33:46 CET 2009
Hello all,
Revision 2170, even if many classes were affected, is conceptually a minor
refactoring of the LoggingEvent class. LoggingEvent class now is an
implementation of the ILoggingEvent interface shown below:
public interface ILoggingEvent extends SDOAware {
public String getThreadName();
public Level getLevel();
public String getMessage();
public LoggerRemoteView getLoggerRemoteView();
public String getFormattedMessage();
public Object[] getArgumentArray();
public ThrowableProxy getThrowableProxy();
public CallerData[] getCallerData();
public Marker getMarker();
public Map<String, String> getMDCPropertyMap();
public long getTimeStamp();
public long getContextBirthTime();
public void prepareForDeferredProcessing();
}
The getContextBithTime method replaces getStartTime() method in LoggingEvent.
The intent is to separate the concern of serialization from LoggingEvent.
Serialization code has moved into LoggingEventSDO (SDO=Serializable Data Object).
The SDOAware interface contains a single method:
public interface SDOAware {
Serializable getSDO();
}
I would like to continue working until we arrive at a situation where
LoggingEventSDO better insulated from changes in LoggingEvent or sub-components
thereof. We are there not there yet. Revision 2170 is just the first step in
what I hope to be the right direction.
Your comments are welcome.
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the logback-dev
mailing list