com.j256.ormlite.logger
Class CommonsLoggingLog

java.lang.Object
  extended by com.j256.ormlite.logger.CommonsLoggingLog
All Implemented Interfaces:
Log

public class CommonsLoggingLog
extends Object
implements Log

Class which implements our Log interface by delegating to the Apache commons logging classes via reflection. We use reflection so we can avoid the dependency. Yes we are delegating to a delegating class.

Author:
graywatson

Constructor Summary
CommonsLoggingLog(String className)
           
 
Method Summary
 void debug(String msg)
          Log a debug message.
 void debug(String msg, Throwable t)
          Log a debug message with a throwable.
 void error(String msg)
          Log a error message.
 void error(String msg, Throwable t)
          Log a error message with a throwable.
 void fatal(String msg)
          Log a fatal message.
 void fatal(String msg, Throwable t)
          Log a fatal message with a throwable.
 void info(String msg)
          Log a info message.
 void info(String msg, Throwable t)
          Log a info message with a throwable.
 boolean isDebugEnabled()
          Returns true if the log mode is in debug or higher.
 boolean isErrorEnabled()
          Returns true if the log mode is in error or higher.
 boolean isFatalEnabled()
          Returns true if the log mode is in fatal or higher.
 boolean isInfoEnabled()
          Returns true if the log mode is in info or higher.
 boolean isTraceEnabled()
          Returns true if the log mode is in trace or higher.
 boolean isWarnEnabled()
          Returns true if the log mode is in warn or higher.
 void trace(String msg)
          Log a trace message.
 void trace(String msg, Throwable t)
          Log a trace message with a throwable.
 void warn(String msg)
          Log a warn message.
 void warn(String msg, Throwable t)
          Log a warn message with a throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsLoggingLog

public CommonsLoggingLog(String className)
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Description copied from interface: Log
Returns true if the log mode is in trace or higher.

Specified by:
isTraceEnabled in interface Log

isDebugEnabled

public boolean isDebugEnabled()
Description copied from interface: Log
Returns true if the log mode is in debug or higher.

Specified by:
isDebugEnabled in interface Log

isInfoEnabled

public boolean isInfoEnabled()
Description copied from interface: Log
Returns true if the log mode is in info or higher.

Specified by:
isInfoEnabled in interface Log

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: Log
Returns true if the log mode is in warn or higher.

Specified by:
isWarnEnabled in interface Log

isErrorEnabled

public boolean isErrorEnabled()
Description copied from interface: Log
Returns true if the log mode is in error or higher.

Specified by:
isErrorEnabled in interface Log

isFatalEnabled

public boolean isFatalEnabled()
Description copied from interface: Log
Returns true if the log mode is in fatal or higher.

Specified by:
isFatalEnabled in interface Log

trace

public void trace(String msg)
Description copied from interface: Log
Log a trace message.

Specified by:
trace in interface Log

trace

public void trace(String msg,
                  Throwable t)
Description copied from interface: Log
Log a trace message with a throwable.

Specified by:
trace in interface Log

debug

public void debug(String msg)
Description copied from interface: Log
Log a debug message.

Specified by:
debug in interface Log

debug

public void debug(String msg,
                  Throwable t)
Description copied from interface: Log
Log a debug message with a throwable.

Specified by:
debug in interface Log

info

public void info(String msg)
Description copied from interface: Log
Log a info message.

Specified by:
info in interface Log

info

public void info(String msg,
                 Throwable t)
Description copied from interface: Log
Log a info message with a throwable.

Specified by:
info in interface Log

warn

public void warn(String msg)
Description copied from interface: Log
Log a warn message.

Specified by:
warn in interface Log

warn

public void warn(String msg,
                 Throwable t)
Description copied from interface: Log
Log a warn message with a throwable.

Specified by:
warn in interface Log

error

public void error(String msg)
Description copied from interface: Log
Log a error message.

Specified by:
error in interface Log

error

public void error(String msg,
                  Throwable t)
Description copied from interface: Log
Log a error message with a throwable.

Specified by:
error in interface Log

fatal

public void fatal(String msg)
Description copied from interface: Log
Log a fatal message.

Specified by:
fatal in interface Log

fatal

public void fatal(String msg,
                  Throwable t)
Description copied from interface: Log
Log a fatal message with a throwable.

Specified by:
fatal in interface Log


Copyright © 2011. All Rights Reserved.