Class StatusConfiguration
java.lang.Object
org.apache.logging.log4j.core.config.status.StatusConfiguration
Configuration for setting up the
StatusLogger fallback listener.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.This class is not used anymore and only kept for binary backward compatibility. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate @Nullable Levelprivate final Lockprivate static final StatusLoggerprivate @Nullable PrintStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.UseStatusLogger.getLogger()and thenAbstractLogger.error(String)instead.voidConfigures and initializes the StatusLogger using the configured options in this instance.private static @Nullable PrintStreamparseStreamName(@Nullable String name) withDestination(@Nullable String destination) Sets the output of theStatusLoggerfallback listener.withStatus(@Nullable String level) Sets the level of theStatusLoggerfallback listener.withStatus(@Nullable Level level) Sets the level of theStatusLoggerfallback listener.withVerboseClasses(String... verboseClasses) Deprecated.This method is ineffective and only kept for binary backward compatibility.withVerbosity(String verbosity) Deprecated.This method is ineffective and only kept for binary backward compatibility.
-
Field Details
-
LOGGER
-
lock
-
initialized
private volatile boolean initialized -
output
-
level
-
-
Constructor Details
-
StatusConfiguration
public StatusConfiguration()
-
-
Method Details
-
error
Deprecated.UseStatusLogger.getLogger()and thenAbstractLogger.error(String)instead.Logs an error message to theStatusLogger.- Parameters:
message- error message to log
-
withDestination
Sets the output of theStatusLoggerfallback listener.Accepted values are as follows:
out(i.e.,System.out)err(i.e.,System.err)- a URI (e.g.,
file:///path/to/log4j-status-logs.txt)
Invalid values will be ignored.
- Parameters:
destination- destination whereStatusLoggermessages should be output- Returns:
this
-
parseStreamName
private static @Nullable PrintStream parseStreamName(@Nullable String name) throws URISyntaxException, FileNotFoundException -
withStatus
Sets the level of theStatusLoggerfallback listener.- Parameters:
level- a level name- Returns:
this
-
withStatus
Sets the level of theStatusLoggerfallback listener.- Parameters:
level- a level- Returns:
this
-
withVerbosity
Deprecated.This method is ineffective and only kept for binary backward compatibility.Specifies the verbosity level to log at. This only applies to classes configured byverboseClasses.- Parameters:
verbosity- basic filter for status logger messages.- Returns:
this
-
withVerboseClasses
Deprecated.This method is ineffective and only kept for binary backward compatibility.Specifies which class names to filter if the configured verbosity level is QUIET.- Parameters:
verboseClasses- names of classes to filter if not using VERBOSE.- Returns:
this
-
initialize
public void initialize()Configures and initializes the StatusLogger using the configured options in this instance.
-