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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StackTraceElement
private final Level
private final Message
private static final long
private String
private final Throwable
private final long
-
Constructor Summary
ConstructorsConstructorDescriptionStatusData
(StackTraceElement caller, Level level, Message msg, Throwable t, String threadName) Creates the StatusData object. -
Method Summary
Modifier and TypeMethodDescriptionFormats the StatusData for viewing.getLevel()
Returns the logging level for the event.Returns the message associated with the event.Returns the StackTraceElement for the method that created the event.Returns the Throwable associated with the event.long
Returns the event's timestamp.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
timestamp
private final long timestamp -
caller
-
level
-
msg
-
threadName
-
throwable
-
-
Constructor Details
-
StatusData
public StatusData(StackTraceElement caller, Level level, Message msg, Throwable t, String threadName) Creates the StatusData object.- Parameters:
caller
- The method that created the event.level
- The logging level.msg
- The message String.t
- The Error or Exception that occurred.threadName
- The thread name
-
-
Method Details
-
getTimestamp
public long getTimestamp()Returns the event's timestamp.- Returns:
- The event's timestamp.
-
getStackTraceElement
Returns the StackTraceElement for the method that created the event.- Returns:
- The StackTraceElement.
-
getLevel
Returns the logging level for the event.- Returns:
- The logging level.
-
getMessage
Returns the message associated with the event.- Returns:
- The message associated with the event.
-
getThreadName
-
getThrowable
Returns the Throwable associated with the event.- Returns:
- The Throwable associated with the event.
-
getFormattedStatus
Formats the StatusData for viewing.- Returns:
- The formatted status data as a String.
-