logahawk.listeners
Class SafeListener

java.lang.Object
  extended by logahawk.listeners.ProxyListener
      extended by logahawk.listeners.SafeListener
All Implemented Interfaces:
Listener

public class SafeListener
extends ProxyListener

A special Listener will swallow any Exceptions thrown by the Listener.log(LogMeta, String) method. This class is useful when you have multiple Listeners and it is acceptable if, when an error occurs, this Listener simply swallows the Exception and moves on.

See Also:
FailSafeListener

Field Summary
 
Fields inherited from class logahawk.listeners.ProxyListener
listener
 
Constructor Summary
SafeListener(Listener listener)
           
 
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

SafeListener

public SafeListener(Listener listener)
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.