org.apache.log
public final class LogEvent extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private String |
m_category |
private ContextMap |
m_contextMap |
private String |
m_message |
private Priority |
m_priority |
private Throwable |
m_throwable |
private long |
m_time |
private static long |
START_TIME |
Constructor and Description |
---|
LogEvent() |
Modifier and Type | Method and Description |
---|---|
String |
getCategory()
Get the category that LogEvent relates to.
|
ContextMap |
getContextMap()
Get ContextMap associated with LogEvent
|
String |
getMessage()
Get the message associated with event.
|
Priority |
getPriority()
Get Priority for LogEvent.
|
long |
getRelativeTime()
Get the time of the log event relative to start of application.
|
Throwable |
getThrowable()
Get throwabe instance associated with event.
|
long |
getTime()
Get the absolute time of the log event.
|
private Object |
readResolve()
Helper method that replaces deserialized priority with correct singleton.
|
void |
setCategory(String category)
Set the LogEvent category.
|
void |
setContextMap(ContextMap contextMap)
Set the ContextMap for this LogEvent.
|
void |
setMessage(String message)
Set the message for LogEvent.
|
void |
setPriority(Priority priority)
Set the priority of LogEvent.
|
void |
setThrowable(Throwable throwable)
Set the throwable for LogEvent.
|
void |
setTime(long time)
Set the absolute time of LogEvent.
|
private static final long START_TIME
private String m_category
private String m_message
private Throwable m_throwable
private long m_time
private Priority m_priority
private ContextMap m_contextMap
public final Priority getPriority()
public final void setPriority(Priority priority)
priority
- the new LogEvent prioritypublic final ContextMap getContextMap()
public final void setContextMap(ContextMap contextMap)
contextMap
- the context mappublic final String getCategory()
public final String getMessage()
public final Throwable getThrowable()
public final long getTime()
public final long getRelativeTime()
public final void setCategory(String category)
category
- the categorypublic final void setMessage(String message)
message
- the messagepublic final void setThrowable(Throwable throwable)
throwable
- the instance of Throwablepublic final void setTime(long time)
time
- the timeprivate Object readResolve() throws ObjectStreamException
ObjectStreamException
- if an error occursCopyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.