|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.logger.LocalLog
public class LocalLog
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.
| Nested Class Summary | |
|---|---|
static class |
LocalLog.Level
Our log levels. |
| Field Summary | |
|---|---|
static String |
LOCAL_LOG_FILE_PROPERTY
|
static String |
LOCAL_LOG_LEVEL_PROPERTY
|
| Constructor Summary | |
|---|---|
LocalLog(String className)
|
|
| Method Summary | |
|---|---|
void |
debug(String msg)
Log a debug message. |
void |
debug(String msg,
Throwable throwable)
Log a debug message with a throwable. |
void |
error(String msg)
Log a error message. |
void |
error(String msg,
Throwable throwable)
Log a error message with a throwable. |
void |
fatal(String msg)
Log a fatal message. |
void |
fatal(String msg,
Throwable throwable)
Log a fatal message with a throwable. |
void |
info(String msg)
Log a info message. |
void |
info(String msg,
Throwable throwable)
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 throwable)
Log a trace message with a throwable. |
void |
warn(String msg)
Log a warn message. |
void |
warn(String msg,
Throwable throwable)
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 |
| Field Detail |
|---|
public static final String LOCAL_LOG_LEVEL_PROPERTY
public static final String LOCAL_LOG_FILE_PROPERTY
| Constructor Detail |
|---|
public LocalLog(String className)
| Method Detail |
|---|
public boolean isTraceEnabled()
Log
isTraceEnabled in interface Logpublic boolean isDebugEnabled()
Log
isDebugEnabled in interface Logpublic boolean isInfoEnabled()
Log
isInfoEnabled in interface Logpublic boolean isWarnEnabled()
Log
isWarnEnabled in interface Logpublic boolean isErrorEnabled()
Log
isErrorEnabled in interface Logpublic boolean isFatalEnabled()
Log
isFatalEnabled in interface Logpublic void trace(String msg)
Log
trace in interface Log
public void trace(String msg,
Throwable throwable)
Log
trace in interface Logpublic void debug(String msg)
Log
debug in interface Log
public void debug(String msg,
Throwable throwable)
Log
debug in interface Logpublic void info(String msg)
Log
info in interface Log
public void info(String msg,
Throwable throwable)
Log
info in interface Logpublic void warn(String msg)
Log
warn in interface Log
public void warn(String msg,
Throwable throwable)
Log
warn in interface Logpublic void error(String msg)
Log
error in interface Log
public void error(String msg,
Throwable throwable)
Log
error in interface Logpublic void fatal(String msg)
Log
fatal in interface Log
public void fatal(String msg,
Throwable throwable)
Log
fatal in interface Log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||