com.j256.ormlite.logger
Class Log4jLog

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

public class Log4jLog
extends Object
implements Log

Class which implements our Log interface by delegating to Apache Log4j via reflection. We use reflection so we can avoid the dependency.

Author:
graywatson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.j256.ormlite.logger.Log
Log.Level
 
Constructor Summary
Log4jLog(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

Log4jLog

public Log4jLog(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.