org.apache.log.output
Class PriorityFilteringTarget
java.lang.Object
org.apache.log.output.AbstractTarget
org.apache.log.output.PriorityFilteringTarget
- All Implemented Interfaces:
- Closeable, ErrorAware, LogTarget
- public class PriorityFilteringTarget
- extends AbstractTarget
This is a priority filtering target that forwards only requests
to other (wrapped) targets that have the same or a higher
priority.
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PriorityFilteringTarget
public PriorityFilteringTarget(Priority priority,
boolean closeWrappedTarget)
- Parameters:
priority
- The priority used to filtercloseWrappedTarget
- see AbstractWrappingTarget
PriorityFilteringTarget
public PriorityFilteringTarget(Priority priority)
- Parameters:
priority
- The priority used to filter
addTarget
public void addTarget(LogTarget target)
- Add a new target to output chain.
- Parameters:
target
- the target
doProcessEvent
protected void doProcessEvent(LogEvent event)
throws java.lang.Exception
- Description copied from class:
AbstractTarget
- Process a log event, via formatting and outputting it.
This should be overidden by subclasses.
- Specified by:
doProcessEvent
in class AbstractTarget
- Parameters:
event
- the log event
- Throws:
java.lang.Exception
- if an event processing error occurs
close
public void close()
- Description copied from class:
AbstractTarget
- Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class AbstractTarget
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.