logahawk.listeners
Class FilterListener

java.lang.Object
  extended by logahawk.listeners.ProxyListener
      extended by logahawk.listeners.FilterListener
All Implemented Interfaces:
Listener
Direct Known Subclasses:
SeverityFilterListener

public class FilterListener
extends ProxyListener

A generic filtering Listener. All filtering decisions are handled by FilterListener.Filter.


Nested Class Summary
static interface FilterListener.Filter
          Accepts or rejects the provided log statement.
 
Field Summary
 
Fields inherited from class logahawk.listeners.ProxyListener
listener
 
Constructor Summary
FilterListener(Listener listener, FilterListener.Filter filter)
           
 
Method Summary
 void log(LogMeta meta, String text)
          Logs the provided statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterListener

public FilterListener(Listener listener,
                      FilterListener.Filter filter)
Method Detail

log

public void log(LogMeta meta,
                String text)
Description copied from interface: Listener
Logs the provided statement. Normally this method should not throw any exceptions. If exceptions are expected it is recommend to wrap this Listener with a FailSafeListener.