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.SerializableThe Status data.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StackTraceElementcallerprivate Levellevelprivate Messagemsgprivate static longserialVersionUIDprivate java.lang.StringthreadNameprivate java.lang.Throwablethrowableprivate longtimestamp
-
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.StringgetFormattedStatus()Formats the StatusData for viewing.LevelgetLevel()Returns the logging level for the event.MessagegetMessage()Returns the message associated with the event.java.lang.StackTraceElementgetStackTraceElement()Returns the StackTraceElement for the method that created the event.java.lang.StringgetThreadName()java.lang.ThrowablegetThrowable()Returns the Throwable associated with the event.longgetTimestamp()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.
-
-