public class Logger
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Logger.JuliToLog4jHandler
juli handler that Redirect to log4j
|
Modifier and Type | Field and Description |
---|---|
static boolean |
configuredManually
true if logger is configured manually (log4j-config file supplied by application)
|
static boolean |
forceJuli
Will force use of java.util.logging (default to try log4j first).
|
static java.util.logging.Logger |
juli
When using java.util.logging.
|
static org.apache.log4j.Logger |
log4j
The application logger (play).
|
static boolean |
recordCaller
Will record and display the caller method.
|
static boolean |
redirectJuli
Will redirect all log from java.util.logging to log4j.
|
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(java.lang.String message,
java.lang.Object... args)
Log with DEBUG level
|
static void |
debug(java.lang.Throwable e,
java.lang.String message,
java.lang.Object... args)
Log with DEBUG level
|
static void |
error(java.lang.String message,
java.lang.Object... args)
Log with ERROR level
|
static void |
error(java.lang.Throwable e,
java.lang.String message,
java.lang.Object... args)
Log with ERROR level
|
static void |
fatal(java.lang.String message,
java.lang.Object... args)
Log with FATAL level
|
static void |
fatal(java.lang.Throwable e,
java.lang.String message,
java.lang.Object... args)
Log with FATAL level
|
static void |
info(java.lang.String message,
java.lang.Object... args)
Log with INFO level
|
static void |
info(java.lang.Throwable e,
java.lang.String message,
java.lang.Object... args)
Log with INFO level
|
static void |
init()
Try to init stuff.
|
static boolean |
isDebugEnabled() |
static boolean |
isEnabledFor(org.apache.log4j.Level log4jLevel) |
static boolean |
isEnabledFor(java.lang.String level) |
static boolean |
isTraceEnabled() |
static void |
setUp(java.lang.String level)
Force logger to a new level.
|
static void |
trace(java.lang.String message,
java.lang.Object... args)
Log with TRACE level
|
static boolean |
usesJuli() |
static void |
warn(java.lang.String message,
java.lang.Object... args)
Log with WARN level
|
static void |
warn(java.lang.Throwable e,
java.lang.String message,
java.lang.Object... args)
Log with WARN level
|
public static boolean forceJuli
public static boolean redirectJuli
public static boolean recordCaller
public static org.apache.log4j.Logger log4j
public static java.util.logging.Logger juli
public static boolean configuredManually
public static boolean usesJuli()
public static void init()
public static void setUp(java.lang.String level)
level
- TRACE,DEBUG,INFO,WARN,ERROR,FATALpublic static boolean isDebugEnabled()
public static boolean isTraceEnabled()
public static boolean isEnabledFor(java.lang.String level)
level
- string representation of Logging-levels as used in log4jpublic static boolean isEnabledFor(org.apache.log4j.Level log4jLevel)
log4jLevel
- Logging-levels as used in log4jpublic static void trace(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void debug(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void debug(java.lang.Throwable e, java.lang.String message, java.lang.Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void info(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void info(java.lang.Throwable e, java.lang.String message, java.lang.Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void warn(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void warn(java.lang.Throwable e, java.lang.String message, java.lang.Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void error(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void error(java.lang.Throwable e, java.lang.String message, java.lang.Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void fatal(java.lang.String message, java.lang.Object... args)
message
- The message patternargs
- Pattern argumentspublic static void fatal(java.lang.Throwable e, java.lang.String message, java.lang.Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentsGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly