logahawk.listeners
Class MemoryListener

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

public class MemoryListener
extends Object
implements Listener

A simple Listener that stores all received logs as LogListenerEntry objects and stores them in memory.


Constructor Summary
MemoryListener()
           
 
Method Summary
 List<LogListenerEntry> getLogEntries()
           
 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

MemoryListener

public MemoryListener()
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.

Specified by:
log in interface Listener

getLogEntries

public List<LogListenerEntry> getLogEntries()