|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.wraplog.AbstractLogger
Abstract base class to write messages about interesting things happening to a log.
Updated to WrapLog version 1.1.
Constructor Summary | |
AbstractLogger()
|
Method Summary | |
protected void |
checkLevel(int logLevel,
String name)
|
void |
debug(String message)
|
void |
debug(String message,
Throwable error)
|
void |
error(String message)
|
void |
error(String message,
Throwable error)
|
int |
getLevel()
|
int |
getLoggedMessageCount()
Count of how many messages have been logged. |
void |
info(String message)
|
void |
info(String message,
Throwable error)
|
boolean |
isDebugEnabled()
|
boolean |
isEnabled(int logLevel)
|
boolean |
isErrorEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isWarnEnabled()
|
void |
log(int logLevel,
String message)
Provided that getLevel() accepts it, log
message . |
void |
log(int logLevel,
String message,
Throwable error)
Provided that getLevel() accepts it, log
message and error . |
protected abstract void |
reallyLog(int logLevel,
String message,
Throwable error)
Logs a message and optional error details. |
void |
setLevel(int newLevel)
|
void |
warn(String message)
|
void |
warn(String message,
Throwable error)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractLogger()
Method Detail |
protected void checkLevel(int logLevel, String name)
public void debug(String message)
public void debug(String message, Throwable error)
public void error(String message)
public void error(String message, Throwable error)
public int getLevel()
public int getLoggedMessageCount()
public void info(String message)
public void info(String message, Throwable error)
public boolean isEnabled(int logLevel)
protected abstract void reallyLog(int logLevel, String message, Throwable error) throws Exception
logLevel
- one of: Level.DEBUG, Level.INFO, Level.WARN, Level.ERRORmessage
- the actual message; this will never be null
error
- an error that is related to the message; unless null
, the name and stack trace of the error are logged
Exception
public void log(int logLevel, String message)
getLevel()
accepts it, log
message
. Otherwise, do nothing.
public void log(int logLevel, String message, Throwable error)
getLevel()
accepts it, log
message
and error
. Otherwise, do nothing.
public void setLevel(int newLevel)
public void warn(String message)
public boolean isDebugEnabled()
public boolean isInfoEnabled()
public boolean isWarnEnabled()
public boolean isErrorEnabled()
public void warn(String message, Throwable error)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |