Class DefaultReliabilityStrategy
java.lang.Object
org.apache.logging.log4j.core.config.DefaultReliabilityStrategy
- All Implemented Interfaces:
LocationAwareReliabilityStrategy
,ReliabilityStrategy
public class DefaultReliabilityStrategy
extends Object
implements ReliabilityStrategy, LocationAwareReliabilityStrategy
Reliability strategy that assumes reconfigurations will never take place.
-
Constructor Summary
-
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, StackTraceElement location, Marker marker, Level level, Message data, Throwable t) Logs an event.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.
-
Constructor Details
-
DefaultReliabilityStrategy
-
-
Method Details
-
log
public void log(Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, Marker marker, Level level, Message data, Throwable t) Description copied from interface:ReliabilityStrategy
Logs an event.- Specified by:
log
in interfaceReliabilityStrategy
- 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
public void log(Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, StackTraceElement location, Marker marker, Level level, Message data, Throwable t) Description copied from interface:LocationAwareReliabilityStrategy
Logs an event.- Specified by:
log
in interfaceLocationAwareReliabilityStrategy
- 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.location
- The location of the caller or null.marker
- A Marker or null if none is present.level
- The event Level.data
- The Message.t
- A Throwable or null.
-
log
Description copied from interface:ReliabilityStrategy
Logs an event.- Specified by:
log
in interfaceReliabilityStrategy
- Parameters:
reconfigured
- supplies the next LoggerConfig if the strategy's LoggerConfig is no longer activeevent
- The log event.
-
getActiveLoggerConfig
Description copied from interface:ReliabilityStrategy
For internal use by the ReliabilityStrategy; returns the LoggerConfig to use.- Specified by:
getActiveLoggerConfig
in interfaceReliabilityStrategy
- Parameters:
next
- supplies the next LoggerConfig if the strategy's LoggerConfig is no longer active- Returns:
- the currently active LoggerConfig
-
afterLogEvent
public void afterLogEvent()Description copied from interface:ReliabilityStrategy
Called after a log event was logged.- Specified by:
afterLogEvent
in interfaceReliabilityStrategy
-
beforeStopAppenders
public void beforeStopAppenders()Description copied from interface:ReliabilityStrategy
Called before all appenders are stopped.- Specified by:
beforeStopAppenders
in interfaceReliabilityStrategy
-
beforeStopConfiguration
Description copied from interface:ReliabilityStrategy
Called before the configuration is stopped.- Specified by:
beforeStopConfiguration
in interfaceReliabilityStrategy
- Parameters:
configuration
- the configuration that will be stopped
-