Package org.codehaus.plexus.logging
Class BaseLoggerManager
java.lang.Object
org.codehaus.plexus.logging.AbstractLoggerManager
org.codehaus.plexus.logging.BaseLoggerManager
- All Implemented Interfaces:
LoggerManager
,Initializable
Base class for all LoggerManagers which use cache of Loggers.
- Author:
- Michal Maczka
-
Field Summary
Fields inherited from interface org.codehaus.plexus.logging.LoggerManager
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Logger
createLogger
(String key) int
getLoggerForComponent
(String role, String roleHint) int
Returns the current threshold for all new loggers.int
getThreshold
(String role, String roleHint) void
protected int
parseThreshold
(String text) void
returnComponentLogger
(String role, String roleHint) void
setThreshold
(int currentThreshold) Sets the threshold for all new loggers.void
setThreshold
(String role, String roleHint, int threshold) void
setThresholds
(int currentThreshold) Sets the threshold for all new loggers.Methods inherited from class org.codehaus.plexus.logging.AbstractLoggerManager
getLoggerForComponent, getThreshold, returnComponentLogger, setThreshold, toMapKey
-
Constructor Details
-
BaseLoggerManager
public BaseLoggerManager()
-
-
Method Details
-
initialize
public void initialize()- Specified by:
initialize
in interfaceInitializable
-
parseThreshold
-
setThreshold
public void setThreshold(int currentThreshold) Sets the threshold for all new loggers. It will NOT affect the existing loggers.This is usually only set once while the logger manager is configured.
- Specified by:
setThreshold
in interfaceLoggerManager
- Parameters:
currentThreshold
- The new threshold.
-
setThresholds
public void setThresholds(int currentThreshold) Sets the threshold for all new loggers. It will NOT affect the existing loggers.This is usually only set once while the logger manager is configured.
- Specified by:
setThresholds
in interfaceLoggerManager
- Parameters:
currentThreshold
- The new threshold.
-
getThreshold
public int getThreshold()Returns the current threshold for all new loggers.- Specified by:
getThreshold
in interfaceLoggerManager
- Returns:
- Returns the current threshold for all new loggers.
-
setThreshold
- Specified by:
setThreshold
in interfaceLoggerManager
-
getThreshold
- Specified by:
getThreshold
in interfaceLoggerManager
-
getLoggerForComponent
- Specified by:
getLoggerForComponent
in interfaceLoggerManager
-
createLogger
-
returnComponentLogger
- Specified by:
returnComponentLogger
in interfaceLoggerManager
-
getActiveLoggerCount
public int getActiveLoggerCount()- Specified by:
getActiveLoggerCount
in interfaceLoggerManager
-
getThresholdAsString
-