org.apache.log.filter

Class AbstractFilterTarget

Implemented Interfaces:
FilterTarget, LogTarget
Known Direct Subclasses:
PriorityFilter

public abstract class AbstractFilterTarget
extends java.lang.Object
implements FilterTarget, LogTarget

Abstract implementation of FilterTarget. A concrete implementation has to implement filter method.
Authors:
Avalon Development Team
Peter Donald

Method Summary

void
addTarget(LogTarget target)
Add a new target to output chain.
protected abstract boolean
filter(LogEvent event)
Filter the log event.
void
processEvent(LogEvent event)
Process a log event

Method Details

addTarget

public void addTarget(LogTarget target)
Add a new target to output chain.
Specified by:
addTarget in interface FilterTarget
Parameters:
target - the target

filter

protected abstract boolean filter(LogEvent event)
Filter the log event.
Parameters:
event - the event
Returns:
return true to discard event, false otherwise

processEvent

public void processEvent(LogEvent event)
Process a log event
Specified by:
processEvent in interface LogTarget
Parameters:
event - the log event