org.directwebremoting.util
Class CommonsLoggingOutput

java.lang.Object
  extended by org.directwebremoting.util.CommonsLoggingOutput
All Implemented Interfaces:
LoggingOutput

public class CommonsLoggingOutput
extends java.lang.Object
implements LoggingOutput

This class is intended to be used by Logger when commons-logging is available, but to not force Logger itself to depend on commons-logging so Logger can catch the ClassDefNotFoundError and use other methods.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Field Summary
 
Fields inherited from interface org.directwebremoting.util.LoggingOutput
LEVEL_DEBUG, LEVEL_ERROR, LEVEL_FATAL, LEVEL_INFO, LEVEL_WARN
 
Constructor Summary
CommonsLoggingOutput(java.lang.Class<?> base)
          Create a logger specific to commons-logging
 
Method Summary
 void debug(java.lang.String message)
          Logger a debug message
 void error(java.lang.String message)
          Logger an error message
 void error(java.lang.String message, java.lang.Throwable th)
          Logger an error message
 void fatal(java.lang.String message)
          Logger a fatal error message
 void fatal(java.lang.String message, java.lang.Throwable th)
          Logger a fatal error message
 void info(java.lang.String message)
          Logger an info message
 boolean isDebugEnabled()
          Save CPU time when we are not debugging
 void warn(java.lang.String message)
          Logger a warning message
 void warn(java.lang.String message, java.lang.Throwable th)
          Logger a warning message
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsLoggingOutput

public CommonsLoggingOutput(java.lang.Class<?> base)
Create a logger specific to commons-logging

Parameters:
base - The class to log against.
Method Detail

debug

public void debug(java.lang.String message)
Description copied from interface: LoggingOutput
Logger a debug message

Specified by:
debug in interface LoggingOutput
Parameters:
message - The text to log

info

public void info(java.lang.String message)
Description copied from interface: LoggingOutput
Logger an info message

Specified by:
info in interface LoggingOutput
Parameters:
message - The text to log

warn

public void warn(java.lang.String message)
Description copied from interface: LoggingOutput
Logger a warning message

Specified by:
warn in interface LoggingOutput
Parameters:
message - The text to log

warn

public void warn(java.lang.String message,
                 java.lang.Throwable th)
Description copied from interface: LoggingOutput
Logger a warning message

Specified by:
warn in interface LoggingOutput
Parameters:
message - The text to log
th - An optional stack trace

error

public void error(java.lang.String message)
Description copied from interface: LoggingOutput
Logger an error message

Specified by:
error in interface LoggingOutput
Parameters:
message - The text to log

error

public void error(java.lang.String message,
                  java.lang.Throwable th)
Description copied from interface: LoggingOutput
Logger an error message

Specified by:
error in interface LoggingOutput
Parameters:
message - The text to log
th - An optional stack trace

fatal

public void fatal(java.lang.String message)
Description copied from interface: LoggingOutput
Logger a fatal error message

Specified by:
fatal in interface LoggingOutput
Parameters:
message - The text to log

fatal

public void fatal(java.lang.String message,
                  java.lang.Throwable th)
Description copied from interface: LoggingOutput
Logger a fatal error message

Specified by:
fatal in interface LoggingOutput
Parameters:
message - The text to log
th - An optional stack trace

isDebugEnabled

public boolean isDebugEnabled()
Description copied from interface: LoggingOutput
Save CPU time when we are not debugging

Specified by:
isDebugEnabled in interface LoggingOutput
Returns:
true if debugging is enabled

Copyright 2008