public class LogEventAdapter extends LoggingEvent
| Modifier and Type | Field and Description |
|---|---|
private LogEvent |
event |
private static long |
JVM_START_TIME |
| Constructor and Description |
|---|
LogEventAdapter(LogEvent event) |
| Modifier and Type | Method and Description |
|---|---|
LogEvent |
getEvent() |
Level |
getLevel()
Return the level of this event.
|
LocationInfo |
getLocationInformation()
Set the location information for this logging event.
|
Category |
getLogger()
Gets the logger of the event.
|
java.lang.String |
getLoggerName()
Return the name of the logger.
|
java.lang.Object |
getMDC(java.lang.String key) |
void |
getMDCCopy()
Obtain a copy of this thread's MDC prior to serialization or
asynchronous logging.
|
java.lang.Object |
getMessage()
Return the message for this logging event.
|
java.lang.String |
getNDC() |
java.util.Map |
getProperties() |
java.lang.String |
getProperty(java.lang.String key) |
java.util.Set |
getPropertyKeySet() |
java.lang.String |
getRenderedMessage() |
static long |
getStartTime()
Returns the time when the application started, in milliseconds
elapsed since 01.01.1970.
|
java.lang.String |
getThreadName() |
ThrowableInformation |
getThrowableInformation()
Returns the throwable information contained within this
event.
|
java.lang.String[] |
getThrowableStrRep()
Return this event's throwable's string[] representaion.
|
private static long |
initStartTime()
Returns the result of
ManagementFactory.getRuntimeMXBean().getStartTime(),
or the current system time if JMX is not available. |
getFQNOfLoggerClass, getTimeStamp, removeProperty, setPropertyprivate static final long JVM_START_TIME
private final LogEvent event
public LogEventAdapter(LogEvent event)
public static long getStartTime()
private static long initStartTime()
ManagementFactory.getRuntimeMXBean().getStartTime(),
or the current system time if JMX is not available.public LogEvent getEvent()
public LocationInfo getLocationInformation()
getLocationInformation in class LoggingEventpublic Level getLevel()
level field.getLevel in class LoggingEventpublic java.lang.String getLoggerName()
categoryName field.getLoggerName in class LoggingEventpublic Category getLogger()
getLogger in class LoggingEventpublic java.lang.Object getMessage()
LoggingEventBefore serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the message possibly after object rendering.
getMessage in class LoggingEventpublic java.lang.String getNDC()
getNDC in class LoggingEventpublic java.lang.Object getMDC(java.lang.String key)
getMDC in class LoggingEventpublic void getMDCCopy()
getMDCCopy in class LoggingEventpublic java.lang.String getRenderedMessage()
getRenderedMessage in class LoggingEventpublic java.lang.String getThreadName()
getThreadName in class LoggingEventpublic ThrowableInformation getThrowableInformation()
null if there is no such information.
Note that the Throwable object contained within a
ThrowableInformation does not survive serialization.
getThrowableInformation in class LoggingEventpublic java.lang.String[] getThrowableStrRep()
getThrowableStrRep in class LoggingEventpublic java.lang.String getProperty(java.lang.String key)
getProperty in class LoggingEventpublic java.util.Set getPropertyKeySet()
getPropertyKeySet in class LoggingEventpublic java.util.Map getProperties()
getProperties in class LoggingEvent