org.codehaus.plexus.logging.console

Class ConsoleLoggerManager

Implemented Interfaces:
Initializable, LoggerManager

public class ConsoleLoggerManager
extends AbstractLoggerManager
implements LoggerManager, Initializable

This is a simple logger manager that will only write the logging statements to the console. Sample configuration:
 
   org.codehaus.plexus.logging.ConsoleLoggerManager
   
     DEBUG
   
 
 
Version:
$Id: ConsoleLoggerManager.java 1323 2004-12-20 23:00:59Z jvanzyl $
Authors:
Jason van Zyl
Trygve Laugstøl

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

ROLE

Constructor Summary

ConsoleLoggerManager()
ConsoleLoggerManager(String threshold)
This special constructor is called directly when the container is bootstrapping itself.

Method Summary

int
getActiveLoggerCount()
Logger
getLoggerForComponent(String role, String roleHint)
int
getThreshold()
int
getThreshold(String role, String roleHint)
void
initialize()
void
returnComponentLogger(String role, String roleHint)
void
setThreshold(String role, String roleHint, int threshold)
void
setThreshold(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

ConsoleLoggerManager

public ConsoleLoggerManager()

ConsoleLoggerManager

public ConsoleLoggerManager(String threshold)
This special constructor is called directly when the container is bootstrapping itself.

Method Details

getActiveLoggerCount

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

getLoggerForComponent

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

getThreshold

public int getThreshold()
Specified by:
getThreshold in interface LoggerManager
Returns:
Returns the threshold.

getThreshold

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

initialize

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

returnComponentLogger

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

setThreshold

public void setThreshold(String role,
                         String roleHint,
                         int threshold)
Specified by:
setThreshold in interface LoggerManager

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: