org.apache.avalon.logging.logkit
Class DefaultLoggingManager

java.lang.Object
  extended byorg.apache.avalon.logging.logkit.DefaultLoggingManager
All Implemented Interfaces:
LoggingManager

public class DefaultLoggingManager
extends Object
implements LoggingManager

A LoggerManager interface declares operation supporting the management of a logging hierarchy.

Author:
Avalon Development Team

Field Summary
static Formatter CONSOLE
           
static String DEFAULT_FORMAT
           
static Formatter FORMAT
           
 
Fields inherited from interface org.apache.avalon.logging.provider.LoggingManager
KEY
 
Constructor Summary
DefaultLoggingManager(Logger logger, LogTargetManager targets, CategoriesDirective categories, String channel, boolean debug)
          Creation of a new logging manager using based on LogKit.
 
Method Summary
 void addCategories(CategoriesDirective descriptor)
          Add a set of category entries using the supplied categories descriptor.
 void addCategories(String root, CategoriesDirective directive)
          Add a set of category entries relative to the supplied base category path, using the supplied descriptor as the definition of subcategories.
 Logger getLoggerForCategory(String category)
          Return the Logger for the specified category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FORMAT

public static final String DEFAULT_FORMAT
See Also:
Constant Field Values

FORMAT

public static final Formatter FORMAT

CONSOLE

public static final Formatter CONSOLE
Constructor Detail

DefaultLoggingManager

public DefaultLoggingManager(Logger logger,
                             LogTargetManager targets,
                             CategoriesDirective categories,
                             String channel,
                             boolean debug)
                      throws Exception
Creation of a new logging manager using based on LogKit.

Parameters:
logger - boostrap logging channel
targets - the logging targets manager
categories - the initial logging categories
channel - the logging category to be used for internal log message
debug - a debug flag
Method Detail

addCategories

public void addCategories(CategoriesDirective descriptor)
Add a set of category entries using the supplied categories descriptor.

Specified by:
addCategories in interface LoggingManager
Parameters:
descriptor - a set of category descriptors to be added under the path

addCategories

public void addCategories(String root,
                          CategoriesDirective directive)
Add a set of category entries relative to the supplied base category path, using the supplied descriptor as the definition of subcategories.

Specified by:
addCategories in interface LoggingManager
Parameters:
root - the category base path
directive - a category directive to add

getLoggerForCategory

public Logger getLoggerForCategory(String category)
Return the Logger for the specified category.

Specified by:
getLoggerForCategory in interface LoggingManager
Parameters:
category - the category path
Returns:
the logging channel


Copyright © The Apache Software Foundation. All Rights Reserved.