org.apache.avalon.excalibur.logger
Class DefaultLogTargetFactoryManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.avalon.excalibur.logger.DefaultLogTargetFactoryManager
All Implemented Interfaces:
LogTargetFactoryManager, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled

public class DefaultLogTargetFactoryManager
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements LogTargetFactoryManager, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable

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

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

Field Summary
private  java.lang.ClassLoader m_classLoader
          The classloader to use to load target factorys.
private  org.apache.avalon.framework.context.Context m_context
          The context object
private  java.util.Map m_factories
          Map for name to logger mapping
 
Constructor Summary
DefaultLogTargetFactoryManager()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
          Reads a configuration object and creates the category mapping.
 void contextualize(org.apache.avalon.framework.context.Context context)
          Reads a context object.
 LogTargetFactory getLogTargetFactory(java.lang.String factoryName)
          Retrieves a LogTargetFactory from a name.
 
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
 

Field Detail

m_factories

private final java.util.Map m_factories
Map for name to logger mapping


m_context

private org.apache.avalon.framework.context.Context m_context
The context object


m_classLoader

private java.lang.ClassLoader m_classLoader
The classloader to use to load target factorys.

Constructor Detail

DefaultLogTargetFactoryManager

public DefaultLogTargetFactoryManager()
Method Detail

getLogTargetFactory

public final LogTargetFactory getLogTargetFactory(java.lang.String factoryName)
Retrieves a LogTargetFactory from a name. Usually the factory name refers to a element name. If this LogTargetFactoryManager does not have the match a null will be returned.

Specified by:
getLogTargetFactory in interface LogTargetFactoryManager
Parameters:
factoryName - The name of a configured LogTargetFactory.
Returns:
the LogTargetFactory or null if none is found.

contextualize

public final void contextualize(org.apache.avalon.framework.context.Context context)
Reads a context object.

Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Parameters:
context - The context object.

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 category mapping.

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