org.apache.avalon.composition.logging
Interface LoggingManager

All Known Implementing Classes:
DefaultLoggingManager

public interface LoggingManager

A LoggerManager that supports the management of a logging hierarchy.

Author:
Avalon Development Team

Field Summary
static String DEFAULT_FORMAT
          The default logging format.
static String DEFAULT_PRIORITY
          The default logging priority value.
static String DEFAULT_TARGET
          The default logging target name.
static String KEY
          Standard context key for the logging manager.
 
Method Summary
 void addCategories(CategoriesDirective descriptor)
          Add a set of category entries using the supplied categories descriptor.
 void addCategories(String path, CategoriesDirective descriptor)
          Add a set of category entries relative to the supplied base category path, using the supplied descriptor as the definition of subcategories.
 Logger getLoggerForCategory(CategoryDirective category)
          Configure Logging channel based on the description supplied in a category descriptor.
 Logger getLoggerForCategory(String category)
          Return the Logger for the specified category.
 Logger getLoggerForCategory(String name, String target, String priority)
          Create a logging channel configured with the supplied category path, priority and target.
 

Field Detail

KEY

public static final String KEY
Standard context key for the logging manager.

See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final String DEFAULT_PRIORITY
The default logging priority value.

See Also:
Constant Field Values

DEFAULT_TARGET

public static final String DEFAULT_TARGET
The default logging target name.

See Also:
Constant Field Values

DEFAULT_FORMAT

public static final String DEFAULT_FORMAT
The default logging format.

See Also:
Constant Field Values
Method Detail

addCategories

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

Parameters:
descriptor - a set of category descriptors to be added under the path

addCategories

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

Parameters:
path - the category base path
descriptor - a set of category descriptors to be added under the base path

getLoggerForCategory

public Logger getLoggerForCategory(String name,
                                   String target,
                                   String priority)
                            throws Exception
Create a logging channel configured with the supplied category path, priority and target.

Parameters:
name - logging category path
target - the logging target to assign the channel to
priority - the priority level to assign to the channel
Returns:
the logging channel
Throws:
Exception - if an error occurs

getLoggerForCategory

public Logger getLoggerForCategory(CategoryDirective category)
                            throws Exception
Configure Logging channel based on the description supplied in a category descriptor.

Parameters:
category - defintion of the channel category, priority and target
Returns:
the logging channel
Throws:
Exception - if an error occurs

getLoggerForCategory

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

Parameters:
category - the category path
Returns:
the logging channel


Copyright © Apache Software Foundation. All Rights Reserved.