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 LoggercreateLogger(String key) intgetLoggerForComponent(String role, String roleHint) intReturns the current threshold for all new loggers.intgetThreshold(String role, String roleHint) voidprotected intparseThreshold(String text) voidreturnComponentLogger(String role, String roleHint) voidsetThreshold(int currentThreshold) Sets the threshold for all new loggers.voidsetThreshold(String role, String roleHint, int threshold) voidsetThresholds(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:
initializein 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:
setThresholdin 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:
setThresholdsin interfaceLoggerManager- Parameters:
currentThreshold- The new threshold.
-
getThreshold
public int getThreshold()Returns the current threshold for all new loggers.- Specified by:
getThresholdin interfaceLoggerManager- Returns:
- Returns the current threshold for all new loggers.
-
setThreshold
- Specified by:
setThresholdin interfaceLoggerManager
-
getThreshold
- Specified by:
getThresholdin interfaceLoggerManager
-
getLoggerForComponent
- Specified by:
getLoggerForComponentin interfaceLoggerManager
-
createLogger
-
returnComponentLogger
- Specified by:
returnComponentLoggerin interfaceLoggerManager
-
getActiveLoggerCount
public int getActiveLoggerCount()- Specified by:
getActiveLoggerCountin interfaceLoggerManager
-
getThresholdAsString
-