public class Logger extends 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 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(String message,
Object... args)
Log with DEBUG level
|
static void |
debug(Throwable e,
String message,
Object... args)
Log with DEBUG level
|
static void |
error(String message,
Object... args)
Log with ERROR level
|
static void |
error(Throwable e,
String message,
Object... args)
Log with ERROR level
|
static void |
fatal(String message,
Object... args)
Log with FATAL level
|
static void |
fatal(Throwable e,
String message,
Object... args)
Log with FATAL level
|
static void |
info(String message,
Object... args)
Log with INFO level
|
static void |
info(Throwable e,
String message,
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(String level) |
static boolean |
isTraceEnabled() |
static void |
setUp(String level)
Force logger to a new level.
|
static void |
trace(String message,
Object... args)
Log with TRACE level
|
static boolean |
usesJuli() |
static void |
warn(String message,
Object... args)
Log with WARN level
|
static void |
warn(Throwable e,
String message,
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 Logger juli
public static boolean configuredManually
public static boolean usesJuli()
public static void init()
public static void setUp(String level)
level
- TRACE,DEBUG,INFO,WARN,ERROR,FATALpublic static boolean isDebugEnabled()
public static boolean isTraceEnabled()
public static boolean isEnabledFor(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(String message, Object... args)
message
- The message patternargs
- Pattern argumentspublic static void debug(String message, Object... args)
message
- The message patternargs
- Pattern argumentspublic static void debug(Throwable e, String message, Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void info(String message, Object... args)
message
- The message patternargs
- Pattern argumentspublic static void info(Throwable e, String message, Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void warn(String message, Object... args)
message
- The message patternargs
- Pattern argumentspublic static void warn(Throwable e, String message, Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void error(String message, Object... args)
message
- The message patternargs
- Pattern argumentspublic static void error(Throwable e, String message, Object... args)
e
- the exception to logmessage
- The message patternargs
- Pattern argumentspublic static void fatal(String message, Object... args)
message
- The message patternargs
- Pattern argumentsGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly