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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.j256.ormlite.logger.Log
Log.Level
 
Constructor Summary
CommonsLoggingLog(String className)
           
 
Method Summary
 boolean isLevelEnabled(Log.Level level)
          Returns true if the log mode is in trace or higher.
 void log(Log.Level level, String msg)
          Log a trace message.
 void log(Log.Level level, String msg, Throwable t)
          Log a trace 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

isLevelEnabled

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

Specified by:
isLevelEnabled in interface Log

log

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

Specified by:
log in interface Log

log

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

Specified by:
log in interface Log


Copyright © 2011. All Rights Reserved.