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 Summary
Modifier and TypeMethodDescriptionvoid
Called after a log event was logged.void
Called before all appenders are stopped.void
beforeStopConfiguration
(Configuration configuration) Called before the configuration is stopped.For internal use by the ReliabilityStrategy; returns the LoggerConfig to use.void
log
(Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, Marker marker, Level level, Message data, Throwable t) Logs an event.void
log
(Supplier<LoggerConfig> reconfigured, LogEvent event) Logs an event.
-
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 activeloggerName
- 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
Logs an event.- Parameters:
reconfigured
- supplies the next LoggerConfig if the strategy's LoggerConfig is no longer activeevent
- The log event.
-
getActiveLoggerConfig
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
Called before the configuration is stopped.- Parameters:
configuration
- the configuration that will be stopped
-