Class SplitLogger
java.lang.Object
org.jlab.logging.SplitLogger
Helper methods to create a
Logger
that sends errors to stderr
and everything else to stdout
- Author:
- dilks
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
configureHandlers
(Logger logger, boolean includePrefix) Configure a logger handlers such that errors go tostderr
and everything else tostdout
static void
configureLevel
(Logger logger, Level level) set the log level of a logger and its handlersstatic Logger
create a newSplitLogger
instance, with formatted messagesstatic Logger
create a newSplitLogger
instance, with an optional message formatting including a prefix
-
Constructor Details
-
SplitLogger
public SplitLogger()
-
-
Method Details
-
create
create a newSplitLogger
instance, with formatted messages- Parameters:
name
- the name of the logger- Returns:
- a new
SplitLogger
instance
-
create
create a newSplitLogger
instance, with an optional message formatting including a prefix- Parameters:
name
- the name of the loggerincludePrefix
- whether or not to include a prefix in the formatting- Returns:
- a new
SplitLogger
instance
-
configureHandlers
Configure a logger handlers such that errors go tostderr
and everything else tostdout
- Parameters:
logger
- theLogger
instance to configureincludePrefix
- whether or not to include a prefix in the formatting
-
configureLevel
-