public class Logger
extends java.util.logging.Logger
| Modifier and Type | Class and Description |
|---|---|
static class |
Logger.ClassicFormatter
Implementation of Formatter to be consistant with
The old-style Logger's formatting
|
static class |
Logger.StampedFormatter
Implementation of Formatter to be consistent with
The old-style Logger's formatting and date stamping
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG
DEBUG
|
static int |
DEBUG_VERBOSE
Output level for DEBUG statements which might have a notable influence
on the overal performance.
|
static int |
ERROR
ERROR
|
static int |
INFO
INFO
|
static int |
PANIC
PANIC
|
static int |
TRACE
TRACE
|
static int |
WARNING
WARNING
|
| Modifier | Constructor and Description |
|---|---|
protected |
Logger(java.lang.String name,
java.lang.String resourceBundle)
Initialize Logger with name and path name to resourceBundle
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
static Logger |
getLogger()
get the default TwelBox logger
|
static void |
print(java.lang.Object o)
Prints the Object to the standard or defined output,
irrespective of the level
|
static void |
print(java.lang.Object o,
int level)
Prints the Object to the standard or defined output,
if the level given is smaller or equal to the Logger.level
|
static void |
printException(java.lang.Exception ex)
Uses printException(String,Exception) to write the Exception message to the standard or defined error stream if the level of
logger is greater or equal to ERROR, and writing the complete stack trace underneath
if the logger is set to DEBUG or DEBUG_VERBOSE.
|
static void |
printException(java.lang.String message,
java.lang.Exception ex)
Writes the message to the standard or defined error stream if the level of
logger is greater or equal to ERROR, writes the complete stack trace underneath
if the logger is set to DEBUG or DEBUG_VERBOSE.
|
static void |
println(java.lang.String str)
Prints the String to the standard or defined output,
irrespective of the level
|
static void |
println(java.lang.String str,
int level)
Prints the String to the standard or defined output,
if the level given is smaller or equal to the Logger.level
|
static void |
setLevel(int level)
sets the Logger level programmatically.
|
addHandler, config, config, entering, entering, entering, exiting, exiting, fine, fine, finer, finer, finest, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getGlobal, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, info, isLoggable, log, log, log, log, log, log, log, logp, logp, logp, logp, logp, logp, logrb, logrb, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setResourceBundle, setUseParentHandlers, severe, severe, throwing, warning, warningpublic static final int PANIC
public static final int INFO
public static final int ERROR
public static final int WARNING
public static final int TRACE
public static final int DEBUG
public static final int DEBUG_VERBOSE
protected Logger(java.lang.String name,
java.lang.String resourceBundle)
name - StringresourceBundle - Stringpublic static Logger getLogger()
public static void setLevel(int level)
It was implemented for test purposes only
level - int, the print level.public static void println(java.lang.String str)
str - Stringpublic static void print(java.lang.Object o)
o - ObjectObject.toString()public static void println(java.lang.String str,
int level)
str - Stringlevel - intpublic static void print(java.lang.Object o,
int level)
o - Objectlevel - intObject.toString()public static void printException(java.lang.String message,
java.lang.Exception ex)
message - Stringex - Exceptionpublic static void printException(java.lang.Exception ex)
ex - ExceptionprintException(String, Exception)protected final void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable