|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.util.Log
public final class Log
A wafer thin wrapper around Commons logging that uses var-args to make it much more efficient to call the logging methods in commons logging without having to surround every call site with calls to Log.isXXXEnabled(). All the methods on this class take a variable length list of arguments and, only if logging is enabled for the level and channel being logged to, will those arguments be toString()'d and appended together.
Method Summary | |
---|---|
static void |
cleanup()
Forces Log to cleanup any cached resources. |
void |
debug(Object... messageParts)
Logs one or more message parts at level debug. |
void |
debug(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level debug. |
void |
error(Object... messageParts)
Logs one or more message parts at level error. |
void |
error(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level error. |
void |
fatal(Object... messageParts)
Logs one or more message parts at level fatal. |
void |
fatal(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level fatal. |
static Log |
getInstance(Class<?> clazz)
Get a Log instance to perform logging within the Class specified. |
Log |
getRealLog()
|
void |
info(Object... messageParts)
Logs one or more message parts at level info. |
void |
info(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level info. |
void |
trace(Object... messageParts)
Logs one or more message parts at level trace. |
void |
trace(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level trace. |
void |
warn(Object... messageParts)
Logs one or more message parts at level warn. |
void |
warn(Throwable throwable,
Object... messageParts)
Logs a Throwable and optional message parts at level warn. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Log getRealLog()
public static Log getInstance(Class<?> clazz)
clazz
- the Class which is going to be doing the logging
public static void cleanup()
public final void fatal(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void error(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void warn(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void info(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void debug(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void trace(Throwable throwable, Object... messageParts)
throwable
- an instance of Throwable that should be logged with stack tracemessageParts
- zero or more objects which should be combined, by calling toString()
to form the log message.public final void fatal(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.public final void error(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.public final void warn(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.public final void info(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.public final void debug(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.public final void trace(Object... messageParts)
messageParts
- one or more objects which should be combined, by calling toString()
to form the log message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |