public abstract class AbstractDefaultMonitor extends AbstractMonitor
This class unifies logging to a single method for easy sub classing.
Subclasses only have to implement the two methods
monitor(java.lang.String) and
monitor(java.lang.Throwable).
LEVELSDEBUG, DEFAULT_LEVEL, ERROR, FATAL, INFO, NONE, WARN| Constructor and Description |
|---|
AbstractDefaultMonitor()
Default constructor.
|
AbstractDefaultMonitor(int theLevel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String s)
debug output.
|
void |
debug(String s,
Throwable throwable)
debug output.
|
void |
error(String s)
error output.
|
void |
error(String s,
Throwable throwable)
error output.
|
void |
fatalError(String s)
fatal error output.
|
void |
fatalError(String s,
Throwable throwable)
fatal error output.
|
void |
info(String s)
info output.
|
void |
info(String s,
Throwable throwable)
info output.
|
protected abstract void |
monitor(String message)
Abstract monitoring method, must be implemented by concrete monitors.
|
protected abstract void |
monitor(Throwable throwable)
Abstract monitoring method, must be implemented by concrete monitors.
|
void |
warn(String s)
warn output.
|
void |
warn(String s,
Throwable throwable)
warn output.
|
isDebugEnabled, isErrorEnabled, isFatalErrorEnabled, isInfoEnabled, isNoMesssages, isWarnEnabled, setLevelpublic final void debug(String s)
s - the messageDNotesMonitor.debug(java.lang.String)public final void debug(String s, Throwable throwable)
s - the messagethrowable - the throwableDNotesMonitor.debug(java.lang.String, java.lang.Throwable)public final void info(String s)
s - the messageDNotesMonitor.info(java.lang.String)public final void info(String s, Throwable throwable)
s - the messagethrowable - the throwableDNotesMonitor.info(java.lang.String, java.lang.Throwable)public final void warn(String s)
s - the messageDNotesMonitor.warn(java.lang.String)public final void warn(String s, Throwable throwable)
s - the messagethrowable - the throwableDNotesMonitor.warn(java.lang.String, java.lang.Throwable)public final void error(String s)
s - the messageDNotesMonitor.error(java.lang.String)public final void error(String s, Throwable throwable)
s - the messagethrowable - the throwableDNotesMonitor.error(java.lang.String, java.lang.Throwable)public final void fatalError(String s)
s - the messageDNotesMonitor.fatalError(java.lang.String)public final void fatalError(String s, Throwable throwable)
s - the messagethrowable - the throwableDNotesMonitor.fatalError(java.lang.String, java.lang.Throwable)protected abstract void monitor(String message)
message - a message to monitorprotected abstract void monitor(Throwable throwable)
throwable - a throwable to monitorCopyright © 2005–2020. All rights reserved.