Top Description Fields Constructors Methods
org.apache.logging.log4j.status

public Class StatusData

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Static Imports
org.apache.logging.log4j.util.Chars.SPACE

The Status data.

Field Summary

Modifier and TypeField and Description
private final StackTraceElement
private final Level
private final Message
private static final long
private String
private final Throwable
private final long

Constructor Summary

AccessConstructor and Description
public
StatusData(final StackTraceElement
The method that created the event.
caller
,
final Level
The logging level.
level
,
final Message
The message String.
msg
,
final Throwable
The Error or Exception that occurred.
t
,
final String
The thread name
threadName
)

Creates the StatusData object.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The formatted status data as a String.
getFormattedStatus
()

Formats the StatusData for viewing.

public Level

Returns:

The logging level.
getLevel
()

Returns the logging level for the event.

public Message

Returns:

The message associated with the event.
getMessage
()

Returns the message associated with the event.

public StackTraceElement

Returns:

The StackTraceElement.
getStackTraceElement
()

Returns the StackTraceElement for the method that created the event.

public String
public Throwable

Returns:

The Throwable associated with the event.
getThrowable
()

Returns the Throwable associated with the event.

public long

Returns:

The event's timestamp.
getTimestamp
()

Returns the event's timestamp.

public String
toString()

Overrides java.lang.Object.toString.

Used in tests

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

callerback to summary
private final StackTraceElement caller
levelback to summary
private final Level level
msgback to summary
private final Message msg
serialVersionUIDback to summary
private static final long serialVersionUID
threadNameback to summary
private String threadName
throwableback to summary
private final Throwable throwable
timestampback to summary
private final long timestamp

Constructor Detail

StatusDataback to summary
public StatusData(final StackTraceElement caller, final Level level, final Message msg, final Throwable t, final String threadName)

Creates the StatusData object.

Parameters
caller:StackTraceElement

The method that created the event.

level:Level

The logging level.

msg:Message

The message String.

t:Throwable

The Error or Exception that occurred.

threadName:String

The thread name

Method Detail

getFormattedStatusback to summary
public String getFormattedStatus()

Formats the StatusData for viewing.

Returns:String

The formatted status data as a String.

Annotations
@SuppressFBWarnings:INFORMATION_EXPOSURE_THROUGH_AN_ERROR_MESSAGE
justification:Log4j prints stacktraces only to logs, which should be private.
@SuppressWarnings:DefaultCharset
getLevelback to summary
public Level getLevel()

Returns the logging level for the event.

Returns:Level

The logging level.

getMessageback to summary
public Message getMessage()

Returns the message associated with the event.

Returns:Message

The message associated with the event.

getStackTraceElementback to summary
public StackTraceElement getStackTraceElement()

Returns the StackTraceElement for the method that created the event.

Returns:StackTraceElement

The StackTraceElement.

getThreadNameback to summary
public String getThreadName()
getThrowableback to summary
public Throwable getThrowable()

Returns the Throwable associated with the event.

Returns:Throwable

The Throwable associated with the event.

getTimestampback to summary
public long getTimestamp()

Returns the event's timestamp.

Returns:long

The event's timestamp.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Used in tests

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override