|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xmlbeans.impl.common.XBLogger
public abstract class XBLogger
A logger interface that strives to make it as easy as possible for developers to write log calls, while simultaneously making those calls as cheap as possible by performing lazy evaluation of the log message.
Field Summary | |
---|---|
static int |
DEBUG
|
static int |
ERROR
|
static int |
FATAL
|
static int |
INFO
|
protected static java.lang.String[] |
LEVEL_STRINGS
Long strings for numeric log level. |
protected static java.lang.String[] |
LEVEL_STRINGS_SHORT
Short strings for numeric log level. |
static int |
WARN
|
Method Summary | |
---|---|
protected abstract void |
_log(int level,
java.lang.Object obj1)
Log a message |
protected abstract void |
_log(int level,
java.lang.Object obj1,
java.lang.Throwable exception)
Log a message |
abstract boolean |
check(int level)
Check if a logger is enabled to log at the specified level This allows code to avoid building strings or evaluating functions in the arguments to log. |
abstract void |
initialize(java.lang.String cat)
|
void |
log(int level,
java.lang.Object... objs)
Log a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int FATAL
protected static final java.lang.String[] LEVEL_STRINGS_SHORT
protected static final java.lang.String[] LEVEL_STRINGS
Method Detail |
---|
public abstract void initialize(java.lang.String cat)
protected abstract void _log(int level, java.lang.Object obj1)
level
- One of DEBUG, INFO, WARN, ERROR, FATALobj1
- The object to log. This is converted to a string.protected abstract void _log(int level, java.lang.Object obj1, java.lang.Throwable exception)
level
- One of DEBUG, INFO, WARN, ERROR, FATALobj1
- The object to log. This is converted to a string.exception
- An exception to be loggedpublic abstract boolean check(int level)
if (logger.check(XBLogger.INFO)) {
logger.log(XBLogger.INFO, "Avoid concatenating " + " strings and evaluating " + functions());
}
level
- One of DEBUG, INFO, WARN, ERROR, FATALpublic void log(int level, java.lang.Object... objs)
Throwable
it is logged specially.
level
- One of DEBUG, INFO, WARN, ERROR, FATALobjs
- the objects to place in the message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |