public abstract class AbstractMonitor extends Object implements DNotesMonitor
This class handles the level of monitors.
| Modifier and Type | Field and Description |
|---|---|
static Map |
LEVELS
Map of all string representing valid levels to their corresponding integer value.
|
DEBUG, DEFAULT_LEVEL, ERROR, FATAL, INFO, NONE, WARN| Constructor and Description |
|---|
AbstractMonitor()
Constructor.
|
AbstractMonitor(int theLevel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDebugEnabled()
Checks if debug output is enabled or not.
|
boolean |
isErrorEnabled()
Checks if error output is enabled or not.
|
boolean |
isFatalErrorEnabled()
Checks if fatal error output is enabled or not.
|
boolean |
isInfoEnabled()
Checks if info output is enabled or not.
|
boolean |
isNoMesssages()
Checks if the monitor level is set to
NONE. |
boolean |
isWarnEnabled()
Checks if warn output is enabled or not.
|
void |
setLevel(int theLevel)
Sets the monitoring level of the monitor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdebug, debug, error, error, fatalError, fatalError, info, info, warn, warnpublic static final Map LEVELS
The standard values are represented by the following strings (not case sensitive):
",
DNotesMonitor.DEBUG"",
DNotesMonitor.INFO"",
DNotesMonitor.WARN"",
DNotesMonitor.ERROR"" and
DNotesMonitor.FATAL"".DNotesMonitor.NONE"
For convenience, also the following values are synonyms:
"TRACE" -> DEBUG "INFORMATION" -> INFO "WARNING" -> WARN "FATALERROR" -> FATAL "NOTHING" -> NONE "DEFAULT" -> WARN
public AbstractMonitor()
public AbstractMonitor(int theLevel)
theLevel - the level of the new monitorpublic final void setLevel(int theLevel)
See LEVELS for allowed values.
DNotesMonitor.DEBUGtheLevel - the new levelpublic final boolean isFatalErrorEnabled()
isFatalErrorEnabled in interface DNotesMonitortrueif enabled, else falseDNotesMonitor.isFatalErrorEnabled()public final boolean isErrorEnabled()
isErrorEnabled in interface DNotesMonitortrueif enabled, else falseDNotesMonitor.isErrorEnabled()public final boolean isWarnEnabled()
isWarnEnabled in interface DNotesMonitortrueif enabled, else falseDNotesMonitor.isWarnEnabled()public final boolean isInfoEnabled()
isInfoEnabled in interface DNotesMonitortrueif enabled, else falseDNotesMonitor.isInfoEnabled()public final boolean isDebugEnabled()
isDebugEnabled in interface DNotesMonitortrueif enabled, else falseDNotesMonitor.isDebugEnabled()public final boolean isNoMesssages()
NONE.true if the monitor level is set to NONE, else falseCopyright © 2005–2020. All rights reserved.