org.codehaus.plexus.logging

## Class BaseLoggerManager

- java.lang.Object
- - org.codehaus.plexus.logging.AbstractLoggerManager
  - - org.codehaus.plexus.logging.BaseLoggerManager

All Implemented Interfaces:
  LoggerManager, Initializable

    public abstract class BaseLoggerManager
    extends AbstractLoggerManager
    implements Initializable

Base class for all LoggerManagers which use cache of Loggers.

Version:
  $Id: BaseLoggerManager.java 7789 2008-10-13 22:54:22Z bentmann $
Author:
  Michal Maczka

### Field Summary

### Fields inherited from interface org.codehaus.plexus.logging.LoggerManager

`ROLE`

### Constructor Summary

Constructors
Constructor and Description
`BaseLoggerManager()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract Logger` `createLogger(java.lang.String key)`
`int` `getActiveLoggerCount()`
`Logger` `getLoggerForComponent(java.lang.String role, java.lang.String roleHint)`
`int` `getThreshold()` Returns the current threshold for all new loggers.
`int` `getThreshold(java.lang.String role, java.lang.String roleHint)`
`java.lang.String` `getThresholdAsString()`
`void` `initialize()`
`protected int` `parseThreshold(java.lang.String text)`
`void` `returnComponentLogger(java.lang.String role, java.lang.String roleHint)`
`void` `setThreshold(int currentThreshold)` Sets the threshold for all new loggers.
`void` `setThreshold(java.lang.String role, java.lang.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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BaseLoggerManager

    public BaseLoggerManager()

### Method Detail

#### initialize

    public void initialize()

Specified by:
  `initialize` in interface `Initializable`

#### parseThreshold

    protected int parseThreshold(java.lang.String text)

#### 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 interface `LoggerManager`
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 interface `LoggerManager`
Parameters:
  `currentThreshold` - The new threshold.

#### getThreshold

    public int getThreshold()

Returns the current threshold for all new loggers.

Specified by:
  `getThreshold` in interface `LoggerManager`
Returns:
  Returns the current threshold for all new loggers.

#### setThreshold

    public void setThreshold(java.lang.String role,
                             java.lang.String roleHint,
                             int threshold)

Specified by:
  `setThreshold` in interface `LoggerManager`

#### getThreshold

    public int getThreshold(java.lang.String role,
                            java.lang.String roleHint)

Specified by:
  `getThreshold` in interface `LoggerManager`

#### getLoggerForComponent

    public Logger getLoggerForComponent(java.lang.String role,
                                        java.lang.String roleHint)

Specified by:
  `getLoggerForComponent` in interface `LoggerManager`

#### createLogger

    protected abstract Logger createLogger(java.lang.String key)

#### returnComponentLogger

    public void returnComponentLogger(java.lang.String role,
                                      java.lang.String roleHint)

Specified by:
  `returnComponentLogger` in interface `LoggerManager`

#### getActiveLoggerCount

    public int getActiveLoggerCount()

Specified by:
  `getActiveLoggerCount` in interface `LoggerManager`

#### getThresholdAsString

    public java.lang.String getThresholdAsString()