Class ReliabilityStrategyFactory
java.lang.Object
org.apache.logging.log4j.core.config.ReliabilityStrategyFactory
Factory for ReliabilityStrategies.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReliabilityStrategy
getReliabilityStrategy
(LoggerConfig loggerConfig) Returns a newReliabilityStrategy
instance based on the value of system propertylog4j.ReliabilityStrategy
.
-
Method Details
-
getReliabilityStrategy
Returns a newReliabilityStrategy
instance based on the value of system propertylog4j.ReliabilityStrategy
. If not value was specified this method returns a newAwaitUnconditionallyReliabilityStrategy
.Valid values for this system property are
"AwaitUnconditionally"
(useAwaitUnconditionallyReliabilityStrategy
),"Locking"
(useLockingReliabilityStrategy
) and"AwaitCompletion"
(use the defaultAwaitCompletionReliabilityStrategy
).Users may also use this system property to specify the fully qualified class name of a class that implements the
ReliabilityStrategy
and has a constructor that accepts a singleLoggerConfig
argument.- Parameters:
loggerConfig
- the LoggerConfig the resultingReliabilityStrategy
is associated with- Returns:
- a ReliabilityStrategy that helps the specified LoggerConfig to log events reliably during or after a configuration change
-