logahawk.listeners
Interface Listener

All Known Subinterfaces:
ListenerContainer
All Known Implementing Classes:
AppendableListener, BufferedListener, ConsoleListener, DefaultListenerContainer, EventDispatchThreadListener, FailSafeListener, FilterListener, JavaLoggerListener, JLogViewer, JOptionPaneListener, LengthTruncatingListener, LineTruncatingListener, MemoryListener, NullListener, ProxyListener, SafeListener, SeverityFilterListener, StreamListener, StringBuilderListener, WriterListener

public interface Listener

This describes a class that consumes log messages from the Logger class. The implementers of this class do the actual logging, they are the final destinations of log messages. The best and obvious example is a Listener that writes to a file. Further, a Listener could send an email, write to a database, or send an XML message. For working with other logging frameworks, a Listener could be written for log4j. The Listener implementation would contain a log4j.Logger which performs the actual logging. In typical usage a Logger uses ArgumentFormatters and SignatureFormatters to format the arguments the Logger receives into a String. The Logger then calls the Listener, providing it a LogMeta (that the Logger created) and that String to log.


Method Summary
 void log(LogMeta meta, String text)
          Logs the provided statement.
 

Method Detail

log

void log(LogMeta meta,
         String text)
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.