java.lang.Object | |
↳ | org.apache.log4j.pattern.LogEvent |
This class is a copy of o.a.l.spi.LoggingEvent from log4j 1.2.15 which has been renamed to keep the same overall class name length to allow a serialization written with a prior instance of o.a.l.spi.LoggingEvent to be deserialized with this class just by mangling the class name in the byte stream.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
categoryName |
This field is deprecated.
This field will be marked as private in future
releases. Please do not access it directly. Use the getLoggerName() method instead.
|
||||||||||
fqnOfCategoryClass | Fully qualified name of the calling category class. | ||||||||||
level |
This field is deprecated.
This field will be marked as private in future
releases. Please do not access it directly. Use the getLevel() method instead.
|
||||||||||
timeStamp | The number of milliseconds elapsed from 1/1/1970 until logging event was created. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Instantiate a LoggingEvent from the supplied parameters.
| |||||||||||
Instantiate a LoggingEvent from the supplied parameters.
| |||||||||||
Create new instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the fully qualified name of the calling logger sub-class/wrapper.
| |||||||||||
Return the level of this event.
| |||||||||||
Set the location information for this logging event.
| |||||||||||
Return the name of the logger.
| |||||||||||
Returns the the context corresponding to the
key
parameter. | |||||||||||
Obtain a copy of this thread's MDC prior to serialization or
asynchronous logging.
| |||||||||||
Return the message for this logging event.
| |||||||||||
This method returns the NDC for this event.
| |||||||||||
Returns the set of properties
for the event.
| |||||||||||
Return a property for this event.
| |||||||||||
Returns the set of the key values in the properties
for the event.
| |||||||||||
Returns the time when the application started, in milliseconds
elapsed since 01.01.1970.
| |||||||||||
Returns the throwable information contained within this
event.
| |||||||||||
Return this event's throwable's string[] representaion.
| |||||||||||
Getter for the event's time stamp.
| |||||||||||
Check for the existence of location information without creating it
(a byproduct of calling getLocationInformation).
| |||||||||||
Set value for MDC property.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This field is deprecated.
This field will be marked as private in future
releases. Please do not access it directly. Use the getLoggerName()
method instead.
The category (logger) name.
Fully qualified name of the calling category class.
This field is deprecated.
This field will be marked as private in future
releases. Please do not access it directly. Use the getLevel()
method instead.
Level of logging event. Level cannot be serializable because it is a flyweight. Due to its special seralization it cannot be declared final either.
This field should not be accessed directly. You shoud use the
getLevel()
method instead.
The number of milliseconds elapsed from 1/1/1970 until logging event was created.
Instantiate a LoggingEvent from the supplied parameters.
Except timeStamp
all the other fields of
LoggingEvent
are filled when actually needed.
logger | The logger generating this event. |
---|---|
level | The level of this event. |
message | The message of this event. |
throwable | The throwable of this event. |
Instantiate a LoggingEvent from the supplied parameters.
Except timeStamp
all the other fields of
LoggingEvent
are filled when actually needed.
logger | The logger generating this event. |
---|---|
timeStamp | the timestamp of this logging event |
level | The level of this event. |
message | The message of this event. |
throwable | The throwable of this event. |
Create new instance.
fqnOfCategoryClass | Fully qualified class name of Logger implementation. |
---|---|
logger | The logger generating this event. |
timeStamp | the timestamp of this logging event |
level | The level of this event. |
message | The message of this event. |
threadName | thread name |
throwable | The throwable of this event. |
ndc | Nested diagnostic context |
info | Location info |
properties | MDC properties |
Get the fully qualified name of the calling logger sub-class/wrapper. Provided for compatibility with log4j 1.3
Return the level of this event. Use this form instead of directly
accessing the level
field.
Set the location information for this logging event. The collected information is cached for future use.
Return the name of the logger. Use this form instead of directly
accessing the categoryName
field.
Returns the the context corresponding to the key
parameter. If there is a local MDC copy, possibly because we are
in a logging server or running inside AsyncAppender, then we
search for the key in MDC copy, if a value is found it is
returned. Otherwise, if the search in MDC copy returns a null
result, then the current thread's MDC
is used.
Note that both the local MDC copy and the current thread's MDC are searched.
Obtain a copy of this thread's MDC prior to serialization or asynchronous logging.
Return the message for this logging event.
Before 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.
This method returns the NDC for this event. It will return the
correct content even if the event was generated in a different
thread or even on a different machine. The get()
method
should never be called directly.
Returns the set of properties for the event. The returned set is unmodifiable by the caller. Provided for compatibility with log4j 1.3
Return a property for this event. The return value can be null. Equivalent to getMDC(String) in log4j 1.2. Provided for compatibility with log4j 1.3.
key | property name |
---|
Returns the set of the key values in the properties for the event. The returned set is unmodifiable by the caller. Provided for compatibility with log4j 1.3
Returns the time when the application started, in milliseconds elapsed since 01.01.1970.
Returns the throwable information contained within this
event. May be null
if there is no such information.
Note that the Throwable object contained within a
ThrowableInformation
does not survive serialization.
Return this event's throwable's string[] representaion.
Getter for the event's time stamp. The time stamp is calculated starting from 1970-01-01 GMT.
Check for the existence of location information without creating it (a byproduct of calling getLocationInformation).
Set value for MDC property. This adds the specified MDC property to the event. Access to the MDC is not synchronized, so this method should only be called when it is known that no other threads are accessing the MDC.