public class Logger
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG |
static int |
ERROR |
static int |
FATAL
can not log at this level, is used to turn off logging
|
static int |
INFO |
static int |
WARN |
| Modifier | Constructor and Description |
|---|---|
protected |
Logger() |
| Modifier and Type | Method and Description |
|---|---|
static void |
debug(java.lang.String message)
Debug logging is the most verbose and can be used for any type of logging.
|
static void |
debug(java.lang.String error,
java.lang.Throwable exception)
Debug logging is the most verbose and can be used for any type of logging.
|
static void |
dumpStack()
same as the Java SE method with the same name
|
static void |
error(java.lang.String message)
Error logging should be used for serious errors which should be reported
even on a release build.
|
static void |
error(java.lang.String error,
java.lang.Throwable throwable)
Error logging should be used for serious errors which should be reported
even on a release build.
|
static int |
getLevel() |
static void |
info(java.lang.String message)
Info logging should be used for information that may prove useful for any
developer.
|
static void |
info(java.lang.String error,
java.lang.Throwable exception)
Info logging should be used for information that may prove useful for any
developer.
|
protected void |
log(java.lang.String message,
int level) |
protected void |
log(java.lang.String error,
java.lang.Throwable throwable,
int level) |
static void |
setLevel(int level) |
static void |
setLogger(Logger logger) |
protected java.lang.String |
toString(int level) |
static void |
warn(boolean assertion)
Warn logging should be used for any errors or bugs.
|
static void |
warn(java.lang.String message)
Warn logging should be used for any errors or bugs.
|
static void |
warn(java.lang.String error,
java.lang.Throwable exception)
Warn logging should be used for any errors or bugs.
|
public static final int DEBUG
Level.FINE,
Constant Field Valuespublic static final int INFO
Level.INFO,
Constant Field Valuespublic static final int WARN
Level.WARNING,
Constant Field Valuespublic static final int ERROR
Level.SEVERE,
Constant Field Valuespublic static final int FATAL
Level.OFF,
Constant Field Valuespublic static void setLogger(Logger logger)
public static void setLevel(int level)
Logger.setLevel(java.util.logging.Level)public static int getLevel()
Logger.getLevel()public static void debug(java.lang.String message)
public static void debug(java.lang.String error,
java.lang.Throwable exception)
public static void info(java.lang.String message)
public static void info(java.lang.String error,
java.lang.Throwable exception)
public static void warn(java.lang.String message)
public static void warn(java.lang.String error,
java.lang.Throwable exception)
public static void warn(boolean assertion)
public static void error(java.lang.String message)
public static void error(java.lang.String error,
java.lang.Throwable throwable)
public static void dumpStack()
Thread.dumpStack()protected java.lang.String toString(int level)
protected void log(java.lang.String message,
int level)
protected void log(java.lang.String error,
java.lang.Throwable throwable,
int level)