|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.engine.log.Logger
public class Logger
Zekr default logger wrapper class for Log4J library. This is not a singleton class. It creates a new
instance of itself per each call to getInstance()
, because different classes should have
different Log4J loggers associated with.
Field Summary | |
---|---|
static org.apache.log4j.Level |
DEBUG
|
static org.apache.log4j.Level |
ERROR
|
static org.apache.log4j.Level |
FATAL
|
static org.apache.log4j.Level |
INFO
|
static java.lang.String |
LOG_FILE_PATH
|
static org.apache.log4j.Level |
WARN
|
Method Summary | |
---|---|
void |
debug(java.lang.Object msg)
|
void |
doFatal(java.lang.Throwable th)
A call to this method will first log the Throwable error, and then exit s the
virtual machine with 1 error status. |
void |
error(java.lang.Object msg)
|
void |
error(java.lang.Object msg,
java.lang.Throwable th)
|
void |
fatal(java.lang.Object msg)
|
static Logger |
getLogger(java.lang.Class theClass)
For logging more precisely by implying the class name from which log message is sent. |
void |
implicitLog(java.lang.Throwable th)
|
void |
info(java.lang.Object msg)
|
void |
log(org.apache.log4j.Level level,
java.lang.Object msg)
|
void |
log(java.lang.Object msg)
This method logs msg.toString() if msg is not of type
(exception). |
void |
memInfo()
Log (info level) memory info. |
void |
warn(java.lang.Object msg)
|
void |
warn(java.lang.Object msg,
java.lang.Throwable th)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Level INFO
public static final org.apache.log4j.Level DEBUG
public static final org.apache.log4j.Level WARN
public static final org.apache.log4j.Level ERROR
public static final org.apache.log4j.Level FATAL
public static final java.lang.String LOG_FILE_PATH
Method Detail |
---|
public static final Logger getLogger(java.lang.Class theClass)
theClass
- logging source class
public final void info(java.lang.Object msg)
public final void memInfo()
public final void debug(java.lang.Object msg)
public final void warn(java.lang.Object msg)
public final void warn(java.lang.Object msg, java.lang.Throwable th)
public final void error(java.lang.Object msg)
public final void error(java.lang.Object msg, java.lang.Throwable th)
public final void fatal(java.lang.Object msg)
public final void log(java.lang.Object msg)
msg.toString()
if msg is not of type
Throwable
(exception). If the msg is in fact a Throwable
object, it logs it as an error message implicitly. Then if
ApplicationConfig.isFullyInitialized()
, it brings up an error dialog and show the exception
to user.
msg
- any object of type String
or Throwable
public final void implicitLog(java.lang.Throwable th)
public final void log(org.apache.log4j.Level level, java.lang.Object msg)
public void doFatal(java.lang.Throwable th)
Throwable
error, and then exit
s the
virtual machine with 1 error status.
th
- throwable object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |