Interface ReliabilityStrategy

All Known Implementing Classes:
AwaitCompletionReliabilityStrategy, AwaitUnconditionallyReliabilityStrategy, DefaultReliabilityStrategy, LockingReliabilityStrategy

public interface ReliabilityStrategy
Interface for objects that know how to ensure delivery of log events to the appropriate appenders, even during and after the configuration has been modified while the system is actively used.
  • Method Details

    • log

      void log(Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, Marker marker, Level level, Message data, Throwable t)
      Logs an event.
      Parameters:
      reconfigured - supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active
      loggerName - The name of the Logger.
      fqcn - The fully qualified class name of the caller.
      marker - A Marker or null if none is present.
      level - The event Level.
      data - The Message.
      t - A Throwable or null.
    • log

      void log(Supplier<LoggerConfig> reconfigured, LogEvent event)
      Logs an event.
      Parameters:
      reconfigured - supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active
      event - The log event.
    • getActiveLoggerConfig

      LoggerConfig getActiveLoggerConfig(Supplier<LoggerConfig> next)
      For internal use by the ReliabilityStrategy; returns the LoggerConfig to use.
      Parameters:
      next - supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active
      Returns:
      the currently active LoggerConfig
    • afterLogEvent

      void afterLogEvent()
      Called after a log event was logged.
    • beforeStopAppenders

      void beforeStopAppenders()
      Called before all appenders are stopped.
    • beforeStopConfiguration

      void beforeStopConfiguration(Configuration configuration)
      Called before the configuration is stopped.
      Parameters:
      configuration - the configuration that will be stopped