org.apache.avalon.excalibur.logger
Class DefaultLogTargetManager

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.excalibur.logger.DefaultLogTargetManager
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, LogTargetFactoryManageable, LogTargetManager

public class DefaultLogTargetManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements LogTargetManager, LogTargetFactoryManageable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable

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

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2001/12/11 09:53:29 $
Author:
Giacomo Pati

Constructor Summary
DefaultLogTargetManager()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
          Reads a configuration object and creates the log targets.
 void contextualize(org.apache.avalon.framework.context.Context context)
          Reads a context object.
 org.apache.log.LogTarget getLogTarget(java.lang.String id)
          Retrieves a LogTarget for an ID.
 void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
          Gets the LogTargetFactoryManager.
 
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

DefaultLogTargetManager

public DefaultLogTargetManager()
Method Detail

getLogTarget

public final org.apache.log.LogTarget getLogTarget(java.lang.String id)
Retrieves a LogTarget for an ID. If this LogTargetManager does not have the match a null will be returned.
Specified by:
getLogTarget in interface LogTargetManager
Parameters:
ID - The LogTarget ID
Returns:
the LogTarget or null if none is found.

contextualize

public final void contextualize(org.apache.avalon.framework.context.Context context)
                         throws org.apache.avalon.framework.context.ContextException
Reads a context object.
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Parameters:
context - The context object.
Throws:
org.apache.avalon.framework.context.ContextException - if the context is malformed

setLogTargetFactoryManager

public final void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
Gets the LogTargetFactoryManager.
Specified by:
setLogTargetFactoryManager in interface LogTargetFactoryManageable

configure

public final void configure(org.apache.avalon.framework.configuration.Configuration configuration)
                     throws org.apache.avalon.framework.configuration.ConfigurationException
Reads a configuration object and creates the log targets.
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
configuration - The configuration object.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if the configuration is malformed


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.