org.codehaus.plexus.logging

Class BaseLoggerManager

public abstract class BaseLoggerManager extends AbstractLoggerManager implements Initializable

Base class for all LoggerManagers which use cache of Loggers.

Version: $Id: BaseLoggerManager.java 4779 2006-11-23 04:09:31Z jvanzyl $

Author: Michal Maczka

Field Summary
intcurrentThreshold
MaploggerCache
Stringthreshold
Method Summary
protected abstract LoggercreateLogger(String key)
intgetActiveLoggerCount()
LoggergetLoggerForComponent(String role, String roleHint)
intgetThreshold()
Returns the current threshold for all new loggers.
intgetThreshold(String role, String roleHint)
StringgetThresholdAsString()
voidinitialize()
protected 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.

Field Detail

currentThreshold

private int currentThreshold

loggerCache

private Map loggerCache

threshold

private String threshold

Method Detail

createLogger

protected abstract Logger createLogger(String key)

getActiveLoggerCount

public int getActiveLoggerCount()

getLoggerForComponent

public Logger getLoggerForComponent(String role, String roleHint)

getThreshold

public int getThreshold()
Returns the current threshold for all new loggers.

Returns: Returns the current threshold for all new loggers.

getThreshold

public int getThreshold(String role, String roleHint)

getThresholdAsString

public String getThresholdAsString()

initialize

public void initialize()

parseThreshold

protected int parseThreshold(String text)

returnComponentLogger

public void returnComponentLogger(String role, String roleHint)

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.

Parameters: currentThreshold The new threshold.

setThreshold

public void setThreshold(String role, String roleHint, int 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.

Parameters: currentThreshold The new threshold.