com.j256.ormlite.logger
Class LocalLog
java.lang.Object
com.j256.ormlite.logger.LocalLog
- All Implemented Interfaces:
- Log
public class LocalLog
- extends Object
- implements Log
Class which implements our Log
interface so we can bypass external logging classes if they are not available.
You can set the log level by setting the System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "trace"). Acceptable
values are: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. You can also redirect the log to a file by setting the
System.setProperty(LocalLog.LOCAL_LOG_FILE_PROPERTY, "log.out"). Otherwise, log output will go to stdout.
- Author:
- graywatson
Nested classes/interfaces inherited from interface com.j256.ormlite.logger.Log |
Log.Level |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCAL_LOG_LEVEL_PROPERTY
public static final String LOCAL_LOG_LEVEL_PROPERTY
- See Also:
- Constant Field Values
LOCAL_LOG_FILE_PROPERTY
public static final String LOCAL_LOG_FILE_PROPERTY
- See Also:
- Constant Field Values
LocalLog
public LocalLog(String className)
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 throwable)
- Description copied from interface:
Log
- Log a trace message with a throwable.
- Specified by:
log
in interface Log
Copyright © 2011. All Rights Reserved.