Interface ILoggingEvent

All Superinterfaces:
DeferredProcessingAware
All Known Implementing Classes:
LoggingEvent, LoggingEventVO

public interface ILoggingEvent extends DeferredProcessingAware
The central interface in logback-classic. In a nutshell, logback-classic is nothing more than a processing chain built around this interface.
Since:
0.9.16
Author:
Ceki Gülcü
  • Method Details

    • getThreadName

    • getLevel

    • getMessage

    • getArgumentArray

    • getFormattedMessage

    • getLoggerName

    • getLoggerContextVO

    • getThrowableProxy

    • getCallerData

      Return caller data associated with this event. Note that calling this event may trigger the computation of caller data.
      Returns:
      the caller data associated with this event.
      See Also:
    • hasCallerData

      boolean hasCallerData()
      If this event has caller data, then true is returned. Otherwise the returned value is null.

      Logback components wishing to use caller data if available without causing it to be computed can invoke this method before invoking getCallerData().

      Returns:
      whether this event has caller data
    • getMarker

      default org.slf4j.Marker getMarker()
      Deprecated.
      Replaced by getMarkerList()
      Returns the first marker is the marker list or null if no markers are available. This method is deprecated and exists solely for backward compatibility reasons. Logback components should use getMarkerList() and cater for all available markers and not only the first one.
      Returns:
      the first marker in the marker list or null if no markers are available
    • getMarkerList

      List<org.slf4j.Marker> getMarkerList()
      Since SLF4J 2.0.0, the slf4j logging API assumes the possibility of multiple Marker instances in a logging event. Consequently, ILoggingEvent needs to cater for this possibility.
      Returns:
      the marker list, may be null
      Since:
      1.3.0
    • getMDCPropertyMap

      Returns the MDC map. The returned value can be an empty map but not null.
    • getMdc

      Deprecated.
      Replaced by [@link #getMDCPropertyMap}
      Synonym for [@link #getMDCPropertyMap}.
    • getTimeStamp

      long getTimeStamp()
      Return the number of elapsed milliseconds since epoch.
      Returns:
      the number of elapsed milliseconds since epoch
      Since:
      1.3
    • getNanoseconds

      Return the number of elapsed nanoseconds found in getInstant() May return -1 if data unavailable.
      Returns:
      the number of elapsed nanoseconds as found in getInstant()
      Since:
      1.3
    • getInstant

      default Instant getInstant()
      Return the Instant the event was created. Default implementation returns the instant corresponding to the value returned by @link getTimeStamp().
      Returns:
      the Instant the event was created.
      Since:
      1.3
    • getSequenceNumber

      The sequence number associated with this event.

      Sequence numbers, if present, should be increasing monotonically.

      Since:
      1.3.0
    • getKeyValuePairs

      List<org.slf4j.event.KeyValuePair> getKeyValuePairs()
      A list of KeyValuePair objects. The returned list may be null.
      Returns:
      may be null
      Since:
      1.3.0
    • prepareForDeferredProcessing

      Specified by:
      prepareForDeferredProcessing in interface DeferredProcessingAware