Package org.apache.logging.log4j.status
Class StatusData
- java.lang.Object
-
- org.apache.logging.log4j.status.StatusData
-
- All Implemented Interfaces:
java.io.Serializable
public class StatusData extends java.lang.Object implements java.io.Serializable
The Status data.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StackTraceElement
caller
private Level
level
private Message
msg
private static long
serialVersionUID
private java.lang.String
threadName
private java.lang.Throwable
throwable
private long
timestamp
-
Constructor Summary
Constructors Constructor Description StatusData(java.lang.StackTraceElement caller, Level level, Message msg, java.lang.Throwable t, java.lang.String threadName)
Creates the StatusData object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFormattedStatus()
Formats the StatusData for viewing.Level
getLevel()
Returns the logging level for the event.Message
getMessage()
Returns the message associated with the event.java.lang.StackTraceElement
getStackTraceElement()
Returns the StackTraceElement for the method that created the event.java.lang.String
getThreadName()
java.lang.Throwable
getThrowable()
Returns the Throwable associated with the event.long
getTimestamp()
Returns the event's timestamp.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
timestamp
private final long timestamp
-
caller
private final java.lang.StackTraceElement caller
-
level
private final Level level
-
msg
private final Message msg
-
threadName
private java.lang.String threadName
-
throwable
private final java.lang.Throwable throwable
-
-
Constructor Detail
-
StatusData
public StatusData(java.lang.StackTraceElement caller, Level level, Message msg, java.lang.Throwable t, java.lang.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 Detail
-
getTimestamp
public long getTimestamp()
Returns the event's timestamp.- Returns:
- The event's timestamp.
-
getStackTraceElement
public java.lang.StackTraceElement getStackTraceElement()
Returns the StackTraceElement for the method that created the event.- Returns:
- The StackTraceElement.
-
getLevel
public Level getLevel()
Returns the logging level for the event.- Returns:
- The logging level.
-
getMessage
public Message getMessage()
Returns the message associated with the event.- Returns:
- The message associated with the event.
-
getThreadName
public java.lang.String getThreadName()
-
getThrowable
public java.lang.Throwable getThrowable()
Returns the Throwable associated with the event.- Returns:
- The Throwable associated with the event.
-
getFormattedStatus
public java.lang.String getFormattedStatus()
Formats the StatusData for viewing.- Returns:
- The formatted status data as a String.
-
-