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, BindMonitor, ContextMonitor, ControllerMonitor, Monitor, RegistrarMonitor, ServletMonitor, ValidationMonitor, ViewMonitor

public class CommonsLoggingMonitor
extends AbstractWritingMonitor

Writing monitor that uses Commons-Logging to log events

Author:
Mauro Talevi

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor
Monitor.Level
 
Constructor Summary
CommonsLoggingMonitor()
          Creates the 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.Throwable exception)
          Traces an exception.
protected  void write(Monitor.Level level, java.lang.String message)
          Writes message for a given level.
 
Methods inherited from class org.codehaus.waffle.monitor.AbstractWritingMonitor
actionMethodExecuted, actionMethodExecutionFailed, actionMethodFound, actionMethodInvocationFailed, applicationContextContainerDestroyed, applicationContextContainerStarted, argumentNameNotMatched, argumentNameResolved, componentRegistered, contextInitializationFailed, contextInitialized, controllerBindFailed, controllerNameResolved, controllerNotFound, controllerValidatorNotFound, controllerValueBound, defaultActionMethodCached, defaultActionMethodFound, findExceptions, genericParameterTypeFound, genericParameterTypeNotFound, instanceRegistered, methodDefinitionNotFound, methodDefinitionNotFound, methodIntercepted, methodNameResolved, monitorLevels, monitorMessages, nonCachingComponentRegistered, pragmaticActionMethodFound, registrarCreated, registrarNotFound, requestContextContainerCreated, requestContextContainerNotFound, responseIsCommitted, servletInitialized, servletServiceFailed, servletServiceRequested, sessionContextContainerCreated, validationFailed, valueConverterFound, valueConverterNotFound, viewBindFailed, viewDispatched, viewForwarded, viewRedirected, viewResponded, viewValueBound, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsLoggingMonitor

public CommonsLoggingMonitor()
Creates the 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(Monitor.Level 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
Parameters:
level - the Level
message - the message to write

trace

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

Specified by:
trace in class AbstractWritingMonitor
Parameters:
exception - the Throwable to trace


Copyright © 2008. All Rights Reserved.