org.apache.avalon.excalibur.logger
Class DefaultLogKitManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.logger.DefaultLogKitManager
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, Loggable, LogKitManager

Deprecated. we should use the new LogKitLoggerManager interface that directly supports the new framework Logger interface.

public class DefaultLogKitManager
extends AbstractLogEnabled
implements LogKitManager, Loggable, Contextualizable, Configurable

Default LogManager implementation. It populates the LogManager from a configuration file.

Since:
4.0
Version:
CVS $Revision: 1.12 $ $Date: 2004/03/10 13:54:49 $
Author:
Avalon Development Team

Constructor Summary
DefaultLogKitManager()
          Deprecated. Creates a new DefaultLogKitManager.
DefaultLogKitManager(Hierarchy hierarchy)
          Deprecated. Creates a new DefaultLogKitManager with an existing Hierarchy.
DefaultLogKitManager(java.lang.String prefix)
          Deprecated. Creates a new DefaultLogKitManager using specified logger name as root logger.
DefaultLogKitManager(java.lang.String prefix, Hierarchy hierarchy)
          Deprecated. Creates a new DefaultLogKitManager with an existing Hierarchy using specified logger name as root logger.
 
Method Summary
 void configure(Configuration configuration)
          Deprecated. Reads a configuration object and creates the category mapping.
 void contextualize(Context context)
          Deprecated. Reads a context object.
 Hierarchy getHierarchy()
          Deprecated. Retrieve Hierarchy for Loggers configured by the system.
 Logger getLogger(java.lang.String categoryName)
          Deprecated. Retrieves a Logger from a category name.
 void setLogger(Logger logger)
          Deprecated. Provide component with a logger.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogKitManager

public DefaultLogKitManager()
Deprecated. 
Creates a new DefaultLogKitManager. It will use a new Hierarchy.


DefaultLogKitManager

public DefaultLogKitManager(Hierarchy hierarchy)
Deprecated. 
Creates a new DefaultLogKitManager with an existing Hierarchy.


DefaultLogKitManager

public DefaultLogKitManager(java.lang.String prefix)
Deprecated. 
Creates a new DefaultLogKitManager using specified logger name as root logger.


DefaultLogKitManager

public DefaultLogKitManager(java.lang.String prefix,
                            Hierarchy hierarchy)
Deprecated. 
Creates a new DefaultLogKitManager with an existing Hierarchy using specified logger name as root logger.

Method Detail

setLogger

public void setLogger(Logger logger)
Deprecated. 
Description copied from interface: Loggable
Provide component with a logger.

Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger

getLogger

public final Logger getLogger(java.lang.String categoryName)
Deprecated. 
Retrieves a Logger from a category name. Usually the category name refers to a configuration attribute name. If this LogKitManager does not have the match the default Logger will be returned and a warning is issued.

Specified by:
getLogger in interface LogKitManager
Parameters:
categoryName - The category name of a configured Logger.
Returns:
the Logger.

getHierarchy

public Hierarchy getHierarchy()
Deprecated. 
Retrieve Hierarchy for Loggers configured by the system.

Specified by:
getHierarchy in interface LogKitManager
Returns:
the Hierarchy

contextualize

public final void contextualize(Context context)
                         throws ContextException
Deprecated. 
Reads a context object.

Specified by:
contextualize in interface Contextualizable
Parameters:
context - The context object.
Throws:
ContextException - if the context is malformed

configure

public final void configure(Configuration configuration)
                     throws ConfigurationException
Deprecated. 
Reads a configuration object and creates the category mapping. If the <categories/> element has an attribute named debug, it will try to load a configuration file specified by that attribute. The contents of that configuration file will be the same as the <categories/> element.

Specified by:
configure in interface Configurable
Parameters:
configuration - The configuration object.
Throws:
ConfigurationException - if the configuration is malformed


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.