|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmol.util.Logger
public final class Logger
Logger mechanism.
| Field Summary | |
|---|---|
private static boolean[] |
_activeLevels
|
private static LoggerInterface |
_logger
|
private static boolean |
_logLevel
|
static boolean |
debugging
|
static boolean |
debuggingHigh
|
static int |
LEVEL_DEBUG
|
static int |
LEVEL_DEBUGHIGH
|
static int |
LEVEL_ERROR
|
static int |
LEVEL_FATAL
|
static int |
LEVEL_INFO
|
static int |
LEVEL_MAX
|
static int |
LEVEL_WARN
|
(package private) static long |
startTime
|
| Constructor Summary | |
|---|---|
Logger()
|
|
| Method Summary | |
|---|---|
static void |
checkMemory()
|
static long |
checkTimer(String msg)
|
static void |
debug(String txt)
Writes a log at DEBUG level. |
static void |
error(String txt)
Writes a log at ERROR level. |
static void |
error(String txt,
Throwable e)
Writes a log at ERROR level with detail on exception. |
static void |
fatal(String txt)
Writes a log at FATAL level. |
static void |
fatal(String txt,
Throwable e)
Writes a log at FATAL level with detail on exception. |
static String |
getLevel(int level)
Returns the text corresponding to a level. |
static int |
getLogLevel()
|
private static boolean |
getProperty(String level,
boolean defaultValue)
|
static void |
info(String txt)
og* Writes a log at INFO level. |
static boolean |
isActiveLevel(int level)
Tells if a logging level is active. |
static boolean |
logLevel()
Indicates if the level is logged. |
static void |
logLevel(boolean log)
Indicates if the level is logged. |
static void |
setActiveLevel(int level,
boolean active)
Changes the activation state for a logging level. |
static void |
setLogger(LoggerInterface logger)
Replaces the current logger implementation by a new one. |
static void |
setLogLevel(int level)
Activates all logging levels up through a given level. |
static void |
startTimer()
|
static void |
warn(String txt)
Writes a log at WARN level. |
static void |
warn(String txt,
Throwable e)
Writes a log at WARN level with detail on exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static LoggerInterface _logger
public static final int LEVEL_FATAL
public static final int LEVEL_ERROR
public static final int LEVEL_WARN
public static final int LEVEL_INFO
public static final int LEVEL_DEBUG
public static final int LEVEL_DEBUGHIGH
public static final int LEVEL_MAX
private static final boolean[] _activeLevels
private static boolean _logLevel
public static boolean debugging
public static boolean debuggingHigh
static long startTime
| Constructor Detail |
|---|
public Logger()
| Method Detail |
|---|
private static boolean getProperty(String level,
boolean defaultValue)
public static void setLogger(LoggerInterface logger)
logger - New logger implementation.public static boolean isActiveLevel(int level)
level - Logging level.
public static void setActiveLevel(int level,
boolean active)
level - Level.active - New activation state.public static void setLogLevel(int level)
level - public static String getLevel(int level)
level - Level.
public static boolean logLevel()
public static void logLevel(boolean log)
log - Indicator.public static void debug(String txt)
txt - String to write.public static void info(String txt)
txt - String to write.public static void warn(String txt)
txt - String to write.
public static void warn(String txt,
Throwable e)
txt - String to write.e - Exception.public static void error(String txt)
txt - String to write.
public static void error(String txt,
Throwable e)
txt - String to write.e - Exception.public static int getLogLevel()
public static void fatal(String txt)
txt - String to write.
public static void fatal(String txt,
Throwable e)
txt - String to write.e - Exception.public static void startTimer()
public static long checkTimer(String msg)
public static void checkMemory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||