Class StatusConfiguration
- java.lang.Object
-
- org.apache.logging.log4j.core.config.status.StatusConfiguration
-
public class StatusConfiguration extends Object
Configuration for setting up theStatusLoggerfallback listener.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStatusConfiguration.VerbosityDeprecated.This class is not used anymore and only kept for binary backward compatibility.
-
Constructor Summary
Constructors Constructor Description StatusConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiderror(String message)Deprecated.UseStatusLogger.getLogger()and thenAbstractLogger.error(String)instead.voidinitialize()Configures and initializes the StatusLogger using the configured options in this instance.StatusConfigurationwithDestination(@Nullable String destination)Sets the output of theStatusLoggerfallback listener.StatusConfigurationwithStatus(@Nullable String level)Sets the level of theStatusLoggerfallback listener.StatusConfigurationwithStatus(@Nullable Level level)Sets the level of theStatusLoggerfallback listener.StatusConfigurationwithVerboseClasses(String... verboseClasses)Deprecated.This method is ineffective and only kept for binary backward compatibility.StatusConfigurationwithVerbosity(String verbosity)Deprecated.This method is ineffective and only kept for binary backward compatibility.
-
-
-
Method Detail
-
error
@Deprecated public void error(String message)
Deprecated.UseStatusLogger.getLogger()and thenAbstractLogger.error(String)instead.Logs an error message to theStatusLogger.- Parameters:
message- error message to log
-
withDestination
public StatusConfiguration withDestination(@Nullable String destination)
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
-
withStatus
public StatusConfiguration withStatus(@Nullable String level)
Sets the level of theStatusLoggerfallback listener.- Parameters:
level- a level name- Returns:
this
-
withStatus
public StatusConfiguration withStatus(@Nullable Level level)
Sets the level of theStatusLoggerfallback listener.- Parameters:
level- a level- Returns:
this
-
withVerbosity
@Deprecated public StatusConfiguration withVerbosity(String verbosity)
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 public StatusConfiguration withVerboseClasses(String... verboseClasses)
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.
-
-