public class LockingReliabilityStrategy extends Object implements ReliabilityStrategy, LocationAwareReliabilityStrategy
Constructor and Description |
---|
LockingReliabilityStrategy(LoggerConfig loggerConfig) |
Modifier and Type | Method and Description |
---|---|
void |
afterLogEvent()
Called after a log event was logged.
|
void |
beforeStopAppenders()
Called before all appenders are stopped.
|
void |
beforeStopConfiguration(Configuration configuration)
Called before the configuration is stopped.
|
LoggerConfig |
getActiveLoggerConfig(org.apache.logging.log4j.util.Supplier<LoggerConfig> next)
For internal use by the ReliabilityStrategy; returns the LoggerConfig to use.
|
void |
log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured,
LogEvent event)
Logs an event.
|
void |
log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured,
String loggerName,
String fqcn,
org.apache.logging.log4j.Marker marker,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.message.Message data,
Throwable t)
Logs an event.
|
void |
log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured,
String loggerName,
String fqcn,
StackTraceElement location,
org.apache.logging.log4j.Marker marker,
org.apache.logging.log4j.Level level,
org.apache.logging.log4j.message.Message data,
Throwable t)
Logs an event.
|
public LockingReliabilityStrategy(LoggerConfig loggerConfig)
public void log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, org.apache.logging.log4j.Marker marker, org.apache.logging.log4j.Level level, org.apache.logging.log4j.message.Message data, Throwable t)
ReliabilityStrategy
log
in interface ReliabilityStrategy
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.public void log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured, String loggerName, String fqcn, StackTraceElement location, org.apache.logging.log4j.Marker marker, org.apache.logging.log4j.Level level, org.apache.logging.log4j.message.Message data, Throwable t)
LocationAwareReliabilityStrategy
log
in interface LocationAwareReliabilityStrategy
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.public void log(org.apache.logging.log4j.util.Supplier<LoggerConfig> reconfigured, LogEvent event)
ReliabilityStrategy
log
in interface ReliabilityStrategy
reconfigured
- supplies the next LoggerConfig if the strategy's LoggerConfig is no longer activeevent
- The log event.public LoggerConfig getActiveLoggerConfig(org.apache.logging.log4j.util.Supplier<LoggerConfig> next)
ReliabilityStrategy
getActiveLoggerConfig
in interface ReliabilityStrategy
next
- supplies the next LoggerConfig if the strategy's LoggerConfig is no longer activepublic void afterLogEvent()
ReliabilityStrategy
afterLogEvent
in interface ReliabilityStrategy
public void beforeStopAppenders()
ReliabilityStrategy
beforeStopAppenders
in interface ReliabilityStrategy
public void beforeStopConfiguration(Configuration configuration)
ReliabilityStrategy
beforeStopConfiguration
in interface ReliabilityStrategy
configuration
- the configuration that will be stoppedCopyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.