org.apache.avalon.excalibur.logger.factory
Class PriorityFilterTargetFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
          extended byorg.apache.avalon.excalibur.logger.factory.PriorityFilterTargetFactory
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, LogTargetFactory, LogTargetFactoryManageable

public final class PriorityFilterTargetFactory
extends AbstractTargetFactory
implements LogTargetFactoryManageable

PriorityFilterTargetFactory class. This factory creates LogTargets with a wrapped PriorityFilteringTarget around it:


 <priority-filter id="target-id" log-level="ERROR">
  <any-target-definition/>
  ...
  <any-target-definition/>
 </priority-filter>

 

This factory creates a PriorityFilteringTarget object with a logging Priority set to the value of the log-level attribute (which defaults to INFO if absent). The LogTarget to filter is described in child elements of the configuration (in the sample above named as <any-target-definition/>).

Since:
4.0
Version:
CVS $Revision: 1.10 $ $Date: 2004/03/13 03:48:55 $
Author:
Avalon Development Team

Field Summary
protected  LogTargetFactoryManager m_logTargetFactoryManager
          The LogTargetFactoryManager
 
Fields inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
m_configuration, m_context
 
Constructor Summary
PriorityFilterTargetFactory()
           
 
Method Summary
 LogTarget createTarget(Configuration configuration)
          create a LogTarget based on a Configuration
 void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
          get the LogTargetFactoryManager
 
Methods inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
configure, contextualize
 
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_logTargetFactoryManager

protected LogTargetFactoryManager m_logTargetFactoryManager
The LogTargetFactoryManager

Constructor Detail

PriorityFilterTargetFactory

public PriorityFilterTargetFactory()
Method Detail

createTarget

public final LogTarget createTarget(Configuration configuration)
                             throws ConfigurationException
create a LogTarget based on a Configuration

Specified by:
createTarget in interface LogTargetFactory
Throws:
ConfigurationException

setLogTargetFactoryManager

public final void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
get the LogTargetFactoryManager

Specified by:
setLogTargetFactoryManager in interface LogTargetFactoryManageable


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