Enum EventRoute

java.lang.Object
java.lang.Enum<EventRoute>
org.apache.logging.log4j.core.async.EventRoute
All Implemented Interfaces:
Serializable, Comparable<EventRoute>

public enum EventRoute extends Enum<EventRoute>
Enumeration over the different destinations where a log event can be sent.
Since:
2.6
See Also:
  • Enum Constant Details

    • ENQUEUE

      public static final EventRoute ENQUEUE
      Enqueues the event for asynchronous logging in the background thread.
    • SYNCHRONOUS

      public static final EventRoute SYNCHRONOUS
      Logs the event synchronously: sends the event directly to the appender (in the current thread). WARNING: This may result in lines logged out of order as synchronous events may be persisted before earlier events, even from the same thread, which wait in the queue.
    • DISCARD

      public static final EventRoute DISCARD
      Discards the event (so it is not logged at all).
  • Method Details

    • values

      public static EventRoute[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EventRoute valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • logMessage

      public abstract void logMessage(AsyncLogger asyncLogger, String fqcn, Level level, Marker marker, Message message, Throwable thrown)
    • logMessage

      public abstract void logMessage(AsyncLoggerConfig asyncLoggerConfig, LogEvent event)
    • logMessage

      public abstract void logMessage(AsyncAppender asyncAppender, LogEvent coreEvent)