|
||||||||||
| 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-classic components.
Writers of logback-classic 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()
|
StackTraceElement[] |
getCallerData()
Get the caller information for this logging event. |
long |
getContextBirthTime()
|
String |
getFormattedMessage()
|
Level |
getLevel()
|
LoggerContextVO |
getLoggerContextVO()
|
String |
getLoggerName()
|
org.slf4j.Marker |
getMarker()
|
Map<String,String> |
getMdc()
Deprecated. Replaced by [@link #getMDCPropertyMap} |
Map<String,String> |
getMDCPropertyMap()
Returns the MDC map. |
String |
getMessage()
|
String |
getThreadName()
|
IThrowableProxy |
getThrowableProxy()
Returns the throwable information contained within this event. |
long |
getTimeStamp()
|
boolean |
hasCallerData()
If this event has caller data, then true is returned. |
void |
prepareForDeferredProcessing()
This method should be called prior to serializing an event. |
void |
setArgumentArray(Object[] argArray)
|
void |
setCallerData(StackTraceElement[] callerDataArray)
|
void |
setLevel(Level level)
|
void |
setLoggerContextRemoteView(LoggerContextVO loggerContextVO)
|
void |
setLoggerName(String loggerName)
|
void |
setMarker(org.slf4j.Marker marker)
|
void |
setMDCPropertyMap(Map<String,String> map)
Set the MDC map for this event. |
void |
setMessage(String message)
|
void |
setThreadName(String threadName)
|
void |
setThrowableProxy(ThrowableProxy tp)
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()
getArgumentArray in interface ILoggingEventpublic Level getLevel()
getLevel in interface ILoggingEventpublic String getLoggerName()
getLoggerName in interface ILoggingEventpublic void setLoggerName(String loggerName)
public String getThreadName()
getThreadName in interface ILoggingEvent
public void setThreadName(String threadName)
throws IllegalStateException
threadName - The threadName to set.
IllegalStateException - If threadName has been already set.public IThrowableProxy getThrowableProxy()
null if there is no such information.
getThrowableProxy in interface ILoggingEventpublic void setThrowableProxy(ThrowableProxy tp)
public void prepareForDeferredProcessing()
prepareForDeferredProcessing in interface ILoggingEventprepareForDeferredProcessing in interface DeferredProcessingAwarepublic LoggerContextVO getLoggerContextVO()
getLoggerContextVO in interface ILoggingEventpublic void setLoggerContextRemoteView(LoggerContextVO loggerContextVO)
public String getMessage()
getMessage in interface ILoggingEventpublic void setMessage(String message)
public long getTimeStamp()
getTimeStamp in interface ILoggingEventpublic void setTimeStamp(long timeStamp)
public void setLevel(Level level)
public StackTraceElement[] getCallerData()
Note that after serialization it is impossible to correctly extract caller information.
getCallerData in interface ILoggingEventILoggingEvent.hasCallerData()public boolean hasCallerData()
ILoggingEventLogback components wishing to use caller data if available without
causing it to be computed can invoke this method before invoking
ILoggingEvent.getCallerData().
hasCallerData in interface ILoggingEventpublic void setCallerData(StackTraceElement[] callerDataArray)
public org.slf4j.Marker getMarker()
getMarker in interface ILoggingEventpublic void setMarker(org.slf4j.Marker marker)
public long getContextBirthTime()
public String getFormattedMessage()
getFormattedMessage in interface ILoggingEventpublic Map<String,String> getMDCPropertyMap()
ILoggingEvent
getMDCPropertyMap in interface ILoggingEventpublic void setMDCPropertyMap(Map<String,String> map)
map - public Map<String,String> getMdc()
getMdc in interface ILoggingEventpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||