|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.debug.SimpleLogger
SimpleLogger is an implementation of a LoggerAdapter that outputs log into to System.err. Its default level is WARN. This is a very simple implementation. The message passed to the various logging methods is rendered using its toString method.
Constructor Summary | |
SimpleLogger()
Constructs a new SimpleLogger |
|
SimpleLogger(int level)
Constructs a new SimpleLogger with a given level |
Method Summary | |
void |
debug(java.lang.Object message)
Writes the given DEBUG message to the log if the DEBUG logging level is enabled |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
Writes the given DEBUG message and stack trace to the log if the DEBUG logging level is enabled |
void |
error(java.lang.Object message)
Writes the given ERROR message to the log if the ERROR logging level is enabled |
void |
error(java.lang.Object message,
java.lang.Throwable t)
Writes the given ERROR message and stack trace to the log if the ERROR logging level is enabled |
void |
fatal(java.lang.Object message)
Writes the given FATAL message to the log if the FATAL logging level is enabled |
void |
fatal(java.lang.Object message,
java.lang.Throwable t)
Writes the given FATAL message and stack trace to the log if the FATAL logging level is enabled |
int |
getLevel()
Gets the logging level of this SimpleLogger |
void |
info(java.lang.Object message)
Writes the given INFO message to the log if the INFO logging level is enabled |
void |
info(java.lang.Object message,
java.lang.Throwable t)
Writes the given INFO message and stack trace to the log if the INFO logging level is enabled |
boolean |
isDebugEnabled()
Indicates whether or not the DEBUG level is enabled for logging. |
boolean |
isEnabledFor(int level)
Indicates whether or not the given level is enabled for logging. |
boolean |
isInfoEnabled()
Indicates whether or not the INFO level is enabled for logging. |
void |
log(int level,
java.lang.Object message)
Writes the given level message to the log if the given logging level is enabled |
void |
log(int level,
java.lang.Object message,
java.lang.Throwable t)
Writes the given level message and stack trace to the log if the given logging level is enabled |
void |
setLevel(int level)
Sets the logging level of this SimpleLogger |
void |
warn(java.lang.Object message)
Writes the given WARN message to the log if the WARN logging level is enabled |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
Writes the given WARN message and stack trace to the log if the WARN logging level is enabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleLogger()
public SimpleLogger(int level)
Method Detail |
public void debug(java.lang.Object message)
debug
in interface LoggerAdapter
message
- is an object which contains the message to logpublic void debug(java.lang.Object message, java.lang.Throwable t)
debug
in interface LoggerAdapter
message
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic void info(java.lang.Object message)
info
in interface LoggerAdapter
message
- is an object which contains the message to logpublic void info(java.lang.Object message, java.lang.Throwable t)
info
in interface LoggerAdapter
message
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic void warn(java.lang.Object message)
warn
in interface LoggerAdapter
message
- is an object which contains the message to logpublic void warn(java.lang.Object message, java.lang.Throwable t)
warn
in interface LoggerAdapter
message
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic void error(java.lang.Object message)
error
in interface LoggerAdapter
message
- is an object which contains the message to logpublic void error(java.lang.Object message, java.lang.Throwable t)
error
in interface LoggerAdapter
message
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic void fatal(java.lang.Object message)
fatal
in interface LoggerAdapter
message
- is an object which contains the message to logpublic void fatal(java.lang.Object message, java.lang.Throwable t)
fatal
in interface LoggerAdapter
message
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic boolean isDebugEnabled()
isDebugEnabled
in interface LoggerAdapter
public boolean isInfoEnabled()
isInfoEnabled
in interface LoggerAdapter
public boolean isEnabledFor(int level)
isEnabledFor
in interface LoggerAdapter
level
- to check if enabled
public void log(int level, java.lang.Object message)
log
in interface LoggerAdapter
level
- of log messagemessage
- is an object which contains the message to logpublic void log(int level, java.lang.Object message, java.lang.Throwable t)
log
in interface LoggerAdapter
level
- of log messagemessage
- is an object which contains the message to logt
- throwable to be rendered using printStackTracepublic void setLevel(int level)
level
- of logging for this SimppleLoggerpublic int getLevel()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |