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 voidconfigureHandlers(Logger logger, boolean includePrefix) Configure a logger handlers such that errors go tostderrand everything else tostdoutstatic voidconfigureLevel(Logger logger, Level level) set the log level of a logger and its handlersstatic Loggercreate a newSplitLoggerinstance, with formatted messagesstatic Loggercreate a newSplitLoggerinstance, with an optional message formatting including a prefix
-
Constructor Details
-
SplitLogger
public SplitLogger()
-
-
Method Details
-
create
create a newSplitLoggerinstance, with formatted messages- Parameters:
name- the name of the logger- Returns:
- a new
SplitLoggerinstance
-
create
create a newSplitLoggerinstance, 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
SplitLoggerinstance
-
configureHandlers
Configure a logger handlers such that errors go tostderrand everything else tostdout- Parameters:
logger- theLoggerinstance to configureincludePrefix- whether or not to include a prefix in the formatting
-
configureLevel
-