|
Logback API Version 0.9.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.classic.spi.LoggingEvent
public class LoggingEvent
The internal representation of logging events. When an affirmative decision
is made to log then a LoggingEvent
instance is created. This
instance is passed around to the different Logback components.
Writers of Logback components such as appenders should be aware of that some
of the LoggingEvent fields are initialized lazily. Therefore, an appender
wishing to output data to be later correctly read by a receiver, must
initialize "lazy" fields prior to writing them out. See the
prepareForDeferredProcessing()
method for the exact list.
Constructor Summary | |
---|---|
LoggingEvent()
|
|
LoggingEvent(String fqcn,
Logger logger,
Level level,
String message,
Throwable throwable,
Object[] argArray)
|
Method Summary | |
---|---|
Object[] |
getArgumentArray()
|
CallerData[] |
getCallerData()
Get the caller information for this logging event. |
String |
getFormattedMessage()
|
Level |
getLevel()
|
LoggerRemoteView |
getLoggerRemoteView()
|
Marker |
getMarker()
|
Map<String,String> |
getMDCPropertyMap()
|
String |
getMessage()
|
static long |
getStartTime()
The time at which this class was loaded into memory, expressed in millisecond elapsed since the epoch (1.1.1970). |
String |
getThreadName()
|
ThrowableInformation |
getThrowableInformation()
Returns the throwable information contained within this event. |
long |
getTimeStamp()
|
void |
prepareForDeferredProcessing()
This method should be called prior to serializing an event. |
void |
setArgumentArray(Object[] argArray)
|
void |
setCallerInformation(CallerData[] callerDataArray)
|
void |
setLevel(Level level)
|
void |
setLoggerRemoteView(LoggerRemoteView loggerRemoteView)
|
void |
setMarker(Marker marker)
|
void |
setMessage(String message)
|
void |
setThreadName(String threadName)
|
void |
setThrowableInformation(ThrowableInformation ti)
Set this event's throwable information. |
void |
setTimeStamp(long timeStamp)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LoggingEvent()
public LoggingEvent(String fqcn, Logger logger, Level level, String message, Throwable throwable, Object[] argArray)
Method Detail |
---|
public void setArgumentArray(Object[] argArray)
public Object[] getArgumentArray()
public Level getLevel()
public String getThreadName()
public void setThreadName(String threadName) throws IllegalStateException
threadName
- The threadName to set.
IllegalStateException
- If threadName has been already set.public ThrowableInformation getThrowableInformation()
null
if there is no such information.
public void setThrowableInformation(ThrowableInformation ti)
public void prepareForDeferredProcessing()
Note that due to performance concerns, this method does NOT extract caller data. It is the responsability of the calller to extract caller information.
public LoggerRemoteView getLoggerRemoteView()
public void setLoggerRemoteView(LoggerRemoteView loggerRemoteView)
public String getMessage()
public void setMessage(String message)
public long getTimeStamp()
public void setTimeStamp(long timeStamp)
public void setLevel(Level level)
public static final long getStartTime()
public CallerData[] getCallerData()
Note that after serialization it is impossible to correctly extract caller information.
public void setCallerInformation(CallerData[] callerDataArray)
public Marker getMarker()
public void setMarker(Marker marker)
public String getFormattedMessage()
public Map<String,String> getMDCPropertyMap()
public String toString()
toString
in class Object
|
Logback API Version 0.9.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |