public class StatusConfiguration
extends java.lang.Object
StatusConsoleListener instances.| Modifier and Type | Class and Description |
|---|---|
static class |
StatusConfiguration.Verbosity
Specifies how verbose the StatusLogger should be.
|
| Modifier and Type | Field and Description |
|---|---|
private static Level |
DEFAULT_STATUS |
private static java.io.PrintStream |
DEFAULT_STREAM |
private static StatusConfiguration.Verbosity |
DEFAULT_VERBOSITY |
private java.io.PrintStream |
destination |
private java.util.Collection<java.lang.String> |
errorMessages |
private boolean |
initialized |
private StatusLogger |
logger |
private Level |
status |
private java.lang.String[] |
verboseClasses |
private StatusConfiguration.Verbosity |
verbosity |
| Constructor and Description |
|---|
StatusConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
configureExistingStatusConsoleListener() |
void |
error(java.lang.String message)
Logs an error message to the StatusLogger.
|
void |
initialize()
Configures and initializes the StatusLogger using the configured options in this instance.
|
private void |
migrateSavedLogMessages() |
private java.io.PrintStream |
parseStreamName(java.lang.String name) |
private void |
registerNewStatusConsoleListener() |
StatusConfiguration |
withDestination(java.lang.String destination)
Specifies the destination for StatusLogger events.
|
StatusConfiguration |
withStatus(Level status)
Specifies the logging level to use for filtering StatusLogger messages.
|
StatusConfiguration |
withStatus(java.lang.String status)
Specifies the logging level by name to use for filtering StatusLogger messages.
|
StatusConfiguration |
withVerboseClasses(java.lang.String... verboseClasses)
Specifies which class names to filter if the configured verbosity level is QUIET.
|
StatusConfiguration |
withVerbosity(java.lang.String verbosity)
Specifies the verbosity level to log at.
|
private static final java.io.PrintStream DEFAULT_STREAM
private static final Level DEFAULT_STATUS
private static final StatusConfiguration.Verbosity DEFAULT_VERBOSITY
private final java.util.Collection<java.lang.String> errorMessages
private final StatusLogger logger
private volatile boolean initialized
private java.io.PrintStream destination
private Level status
private StatusConfiguration.Verbosity verbosity
private java.lang.String[] verboseClasses
public void error(java.lang.String message)
message - error message to log.public StatusConfiguration withDestination(java.lang.String destination)
out (default) for using
standard out, err for using standard error, or a file URI to
which log events will be written. If the provided URI is invalid, then the default destination of standard
out will be used.destination - where status log messages should be output.thisprivate java.io.PrintStream parseStreamName(java.lang.String name)
throws java.net.URISyntaxException,
java.io.FileNotFoundException
java.net.URISyntaxExceptionjava.io.FileNotFoundExceptionpublic StatusConfiguration withStatus(java.lang.String status)
status - name of logger level to filter below.thisLevelpublic StatusConfiguration withStatus(Level status)
status - logger level to filter below.thispublic StatusConfiguration withVerbosity(java.lang.String verbosity)
verboseClasses.verbosity - basic filter for status logger messages.thispublic StatusConfiguration withVerboseClasses(java.lang.String... verboseClasses)
verboseClasses - names of classes to filter if not using VERBOSE.thispublic void initialize()
private boolean configureExistingStatusConsoleListener()
private void registerNewStatusConsoleListener()
private void migrateSavedLogMessages()