Package com.atlassian.bitbucket.log
Interface LoggingService
public interface LoggingService
Service that allows runtime configuration of the logging subsystem.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the effective logging level of the specified logger.void
Sets the level for the specified logger to the provided level.void
setRootLevel
(String level) Sets the output level for the root logger, which is a special logger that is the ultimate parent of all other loggers in the system.
-
Method Details
-
getLevel
Retrieves the effective logging level of the specified logger. The effective logging level is level that is defined for the specified logger or, if no level is defined for the specified logger, the effective level for its parent logger.- Parameters:
loggerName
- the name of the logger to retrieve the output level for- Returns:
- the effective logging level of the specified logger
-
getRootLevel
- Returns:
- the effective logging level for the root logger, which is the ultimate parent of all loggers in the system
-
setLevel
Sets the level for the specified logger to the provided level. Valid levels are:- OFF
- TRACE
- DEBUG
- INFO
- WARN
- ERROR
OFF
disables all output from the specified logger. All other levels include output at that specific level as well as all output from the levels below them (meaningTRACE
will include output atDEBUG
,INFO
,WARN
andERROR
levels).- Parameters:
loggerName
- the name of the logger to adjust the output level forlevel
- the new output level for the logger
-
setRootLevel
Sets the output level for the root logger, which is a special logger that is the ultimate parent of all other loggers in the system.- Parameters:
level
- the new output level for the root logger- See Also:
-