logahawk.listeners
Class SafeListener
java.lang.Object
logahawk.listeners.ProxyListener
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SafeListener
public SafeListener(Listener listener)
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.