Class StatusData

    • Constructor Detail

      • StatusData

        public StatusData​(@Nullable
                          StackTraceElement caller,
                          org.apache.logging.log4j.Level level,
                          org.apache.logging.log4j.message.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
        Since:
        2.4
    • Method Detail

      • getInstant

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

        @Deprecated
        public long getTimestamp()
        Deprecated.
        since 2.23.0, 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 org.apache.logging.log4j.Level getLevel()
        Returns the logging level for the event.
        Returns:
        the event's logging level
      • getMarker

        public org.apache.logging.log4j.Marker getMarker()
      • getMessage

        public org.apache.logging.log4j.message.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
        Since:
        2.4
      • 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