org.jmol.util
public final class Logger extends Object
| Field Summary | |
|---|---|
| static boolean | debugging |
| 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 |
| static long | startTime |
| static boolean[] | _activeLevels |
| static LoggerInterface | _logger |
| static boolean | _logLevel |
| Method Summary | |
|---|---|
| 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 boolean | getProperty(String level, boolean defaultValue) |
| static void | info(String txt)
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.
|
Parameters: txt String to write.
Parameters: txt String to write.
Parameters: txt String to write. e Exception.
Parameters: txt String to write.
Parameters: txt String to write. e Exception.
Parameters: level Level.
Returns: Corresponding text.
Parameters: txt String to write.
Parameters: level Logging level.
Returns: Active.
Returns: Indicator.
Parameters: log Indicator.
Parameters: level Level. active New activation state.
Parameters: logger New logger implementation.
Parameters: level
Parameters: txt String to write.
Parameters: txt String to write. e Exception.