org.codehaus.waffle.monitor
Class CommonsLoggingMonitor

java.lang.Object
  extended by org.codehaus.waffle.monitor.AbstractWritingMonitor
      extended by org.codehaus.waffle.monitor.CommonsLoggingMonitor
All Implemented Interfaces:
ActionMonitor

public class CommonsLoggingMonitor
extends AbstractWritingMonitor

Writing monitor that uses Commons-Logging to log events

Author:
Mauro Talevi

Constructor Summary
CommonsLoggingMonitor()
          Creates a default CommonsLoggingMonitor.
CommonsLoggingMonitor(org.apache.commons.logging.Log log)
          Creates a CommonsLoggingMonitor with a given Log instance
CommonsLoggingMonitor(java.lang.String logName)
          Creates a CommonsLoggingMonitor with a given Log instance name.
 
Method Summary
protected  void trace(java.lang.Exception exception)
          Traces an exception.
protected  void write(MonitorLevel level, java.lang.String message)
          Writes message for a given level.
 
Methods inherited from class org.codehaus.waffle.monitor.AbstractWritingMonitor
actionMethodExecutionFailed, actionMethodFound, defaultActionMethodCached, defaultActionMethodFound, methodNameResolved, pragmaticActionMethodFound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsLoggingMonitor

public CommonsLoggingMonitor()
Creates a default CommonsLoggingMonitor.


CommonsLoggingMonitor

public CommonsLoggingMonitor(java.lang.String logName)
Creates a CommonsLoggingMonitor with a given Log instance name. It uses the LogFactory to create the Log instance.

Parameters:
logName - the name of the Log

CommonsLoggingMonitor

public CommonsLoggingMonitor(org.apache.commons.logging.Log log)
Creates a CommonsLoggingMonitor with a given Log instance

Parameters:
log - the Log to write to
Method Detail

write

protected void write(MonitorLevel level,
                     java.lang.String message)
Description copied from class: AbstractWritingMonitor
Writes message for a given level. Concrete implementations should provide writing functionality.

Specified by:
write in class AbstractWritingMonitor

trace

protected void trace(java.lang.Exception exception)
Description copied from class: AbstractWritingMonitor
Traces an exception. Concrete implementations should provide writing functionality.

Specified by:
trace in class AbstractWritingMonitor


Copyright © 2007 null. All Rights Reserved.