Package org.apache.logging.log4j.status
Class StatusData
java.lang.Object
org.apache.logging.log4j.status.StatusData
- All Implemented Interfaces:
Serializable
The Status data.
- See Also:
-
Constructor Summary
ConstructorDescriptionStatusData
(StackTraceElement caller, Level level, Message message, Throwable throwable, String threadName) Constructs the instance using given properties. -
Method Summary
Modifier and TypeMethodDescriptionFormats the event in to a log line for viewing.Returns the instant of the event.getLevel()
Returns the logging level for the event.Returns the message associated with the event.Returns the method that created the event.Returns the name of the thread associated with the event.Returns the error associated with the event.long
Deprecated.toString()
-
Constructor Details
-
StatusData
public StatusData(@Nullable StackTraceElement caller, Level level, Message message, @Nullable Throwable throwable, @Nullable String threadName) Constructs the instance using given properties.- Parameters:
caller
- the method that created the eventlevel
- a logging levelmessage
- a messagethrowable
- the error occurredthreadName
- the thread name- Since:
- 2.4
-
-
Method Details
-
getInstant
Returns the instant of the event.- Returns:
- the event's instant
- Since:
- 2.23.0
-
getTimestamp
Deprecated.since 2.23.0, usegetInstant()
instead.Returns the instant of the event.- Returns:
- the event's instant
-
getStackTraceElement
Returns the method that created the event.- Returns:
- the method that created the event
-
getLevel
Returns the logging level for the event.- Returns:
- the event's logging level
-
getMessage
Returns the message associated with the event.- Returns:
- the message associated with the event
-
getThreadName
Returns the name of the thread associated with the event.- Returns:
- the name of the thread associated with the event
- Since:
- 2.4
-
getThrowable
Returns the error associated with the event.- Returns:
- the error associated with the event
-
getFormattedStatus
Formats the event in to a log line for viewing.- Returns:
- the formatted event
-
toString
-
getInstant()
instead.