|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.Logger
public class Logger
High level API for logging operations. Example, logging with the default application logger:
Logger.info("Hello!");Example, logging with a custom logger:
Logger.of("my.logger").info("Hello!")
Nested Class Summary | |
---|---|
static class |
Logger.ALogger
Typical logger interface |
Constructor Summary | |
---|---|
Logger()
|
Method Summary | |
---|---|
static void |
debug(java.lang.String message)
Log a message with the DEBUG level. |
static void |
debug(java.lang.String message,
java.lang.Throwable error)
Log a message with the DEBUG level. |
static void |
error(java.lang.String message)
Log a message with the ERROR level. |
static void |
error(java.lang.String message,
java.lang.Throwable error)
Log a message with the ERROR level. |
static void |
info(java.lang.String message)
Log a message with the INFO level. |
static void |
info(java.lang.String message,
java.lang.Throwable error)
Log a message with the INFO level. |
static boolean |
isDebugEnabled()
Returns true if the logger instance enabled for the DEBUG level? |
static boolean |
isErrorEnabled()
Returns true if the logger instance enabled for the ERROR level? |
static boolean |
isInfoEnabled()
Returns true if the logger instance enabled for the INFO level? |
static boolean |
isTraceEnabled()
Returns true if the logger instance enabled for the TRACE level? |
static boolean |
isWarnEnabled()
Returns true if the logger instance enabled for the WARN level? |
static Logger.ALogger |
of(java.lang.Class<?> clazz)
Obtain a logger instance. |
static Logger.ALogger |
of(java.lang.String name)
Obtain a logger instance. |
static void |
trace(java.lang.String message)
Log a message with the TRACE level. |
static void |
trace(java.lang.String message,
java.lang.Throwable error)
Log a message with the TRACE level. |
static void |
warn(java.lang.String message)
Log a message with the WARN level. |
static void |
warn(java.lang.String message,
java.lang.Throwable error)
Log a message with the WARN level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Logger()
Method Detail |
---|
public static Logger.ALogger of(java.lang.String name)
name
- name of the logger
public static Logger.ALogger of(java.lang.Class<?> clazz)
clazz
- a class whose name will be used as logger name
public static boolean isTraceEnabled()
true
if the logger instance enabled for the TRACE level?
public static boolean isDebugEnabled()
true
if the logger instance enabled for the DEBUG level?
public static boolean isInfoEnabled()
true
if the logger instance enabled for the INFO level?
public static boolean isWarnEnabled()
true
if the logger instance enabled for the WARN level?
public static boolean isErrorEnabled()
true
if the logger instance enabled for the ERROR level?
public static void trace(java.lang.String message)
message
- message to logpublic static void trace(java.lang.String message, java.lang.Throwable error)
message
- message to logerror
- associated exceptionpublic static void debug(java.lang.String message)
message
- message to logpublic static void debug(java.lang.String message, java.lang.Throwable error)
message
- message to logerror
- associated exceptionpublic static void info(java.lang.String message)
message
- message to logpublic static void info(java.lang.String message, java.lang.Throwable error)
message
- message to logerror
- associated exceptionpublic static void warn(java.lang.String message)
message
- message to logpublic static void warn(java.lang.String message, java.lang.Throwable error)
message
- message to logerror
- associated exceptionpublic static void error(java.lang.String message)
message
- message to logpublic static void error(java.lang.String message, java.lang.Throwable error)
message
- message to logerror
- associated exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |