Class StatusData

java.lang.Object
org.apache.logging.log4j.status.StatusData
All Implemented Interfaces:
Serializable

public class StatusData extends Object implements Serializable
The Status data.
See Also:
  • 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 event
      level - a logging level
      message - a message
      throwable - the error occurred
      threadName - the thread name
  • Method Details

    • getInstant

      public Instant getInstant()
      Returns the instant of the event.
      Returns:
      the event's instant
    • getTimestamp

      @Deprecated public long getTimestamp()
      Deprecated.
      Use getInstant() instead.
      Returns the instant of the event.
      Returns:
      the event's instant
    • getStackTraceElement

      @Nullable public StackTraceElement getStackTraceElement()
      Returns the method that created the event.
      Returns:
      the method that created the event
    • getLevel

      public Level getLevel()
      Returns the logging level for the event.
      Returns:
      the event's logging level
    • getMessage

      public Message getMessage()
      Returns the message associated with the event.
      Returns:
      the message associated with the event
    • getThreadName

      public String getThreadName()
      Returns the name of the thread associated with the event.
      Returns:
      the name of the thread associated with the event
    • getThrowable

      @Nullable public Throwable getThrowable()
      Returns the error associated with the event.
      Returns:
      the error associated with the event
    • getFormattedStatus

      public String getFormattedStatus()
      Formats the event in to a log line for viewing.
      Returns:
      the formatted event
    • toString

      public String toString()
      Overrides:
      toString in class Object