Package tripleplay.util
Class Logger.Levels
java.lang.Object
tripleplay.util.Logger.Levels
- Enclosing class:
Logger
Manages the target log levels for a given ident.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current default log level.Returns the current log level for the specified identifier, or null if no level is configured for that identifier.set
(String ident, Logger.Level level) Configures the log level for messages with the supplied identifier.set
(Logger logger, Logger.Level level) Configures the log level for messages from the supplied logger.setDefault
(Logger.Level level) Configures the default log level.boolean
shouldLog
(Logger.Level level, String ident) Returns true if a message with the specified level and ident should be logged.
-
Constructor Details
-
Levels
public Levels()
-
-
Method Details
-
setDefault
Configures the default log level. Messages with severity lower than this level will not be logged unless a specific level is set for their identifier. -
set
Configures the log level for messages with the supplied identifier. Messages with the supplied identifier with severity lower than this level will not be logged regardless of the default log level. Pass null to clear any level cutoff forident
. -
set
Configures the log level for messages from the supplied logger. Messages from the supplied logger with severity lower than this level will not be logged regardless of the default log level. Pass null to clear any level cutoff forlogger
. -
defaultLevel
Returns the current default log level. -
level
Returns the current log level for the specified identifier, or null if no level is configured for that identifier. -
shouldLog
Returns true if a message with the specified level and ident should be logged.
-