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.
Author:
Michal Maczka
  • Constructor Details

    • BaseLoggerManager

      public BaseLoggerManager()
  • Method Details

    • initialize

      public void initialize()
      Specified by:
      initialize in interface Initializable
    • parseThreshold

      protected int parseThreshold(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(String role, String roleHint, int threshold)
      Specified by:
      setThreshold in interface LoggerManager
    • getThreshold

      public int getThreshold(String role, String roleHint)
      Specified by:
      getThreshold in interface LoggerManager
    • getLoggerForComponent

      public Logger getLoggerForComponent(String role, String roleHint)
      Specified by:
      getLoggerForComponent in interface LoggerManager
    • createLogger

      protected abstract Logger createLogger(String key)
    • returnComponentLogger

      public void returnComponentLogger(String role, String roleHint)
      Specified by:
      returnComponentLogger in interface LoggerManager
    • getActiveLoggerCount

      public int getActiveLoggerCount()
      Specified by:
      getActiveLoggerCount in interface LoggerManager
    • getThresholdAsString

      public String getThresholdAsString()