|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.arakhne.logging.AbstractLogger
public abstract class AbstractLogger
This class provides the base for a concrete implementation of the Logger
interface.
Logger| Constructor Summary | |
|---|---|
AbstractLogger()
|
|
| Method Summary | |
|---|---|
void |
addLoggerEventListener(LoggerEventListener listener)
Add listener on logger events. |
void |
debug(Object source,
String arg0)
Log a message at the DEBUG level. |
void |
debug(Object source,
String arg0,
Throwable arg1)
|
void |
error(Object source,
String arg0)
Log a message at the ERROR level. |
void |
error(Object source,
String arg0,
Throwable arg1)
Log an exception (throwable) at the ERROR level with an accompanying message. |
protected void |
fireLoggerEvent(Object source,
LogLevel level,
String message)
Notify the logger event listeners. |
protected void |
fireLoggerEvent(Object source,
LogLevel level,
String message,
Throwable exception)
Notify the logger event listeners. |
LogLevel |
getLogLevel()
Replies the minimum log level. |
void |
info(Object source,
String arg0)
Log a message at the INFO level. |
void |
info(Object source,
String arg0,
Throwable arg1)
Log an exception (throwable) at the INFO level with an accompanying message. |
boolean |
isDebugEnabled()
|
boolean |
isErrorEnabled()
|
boolean |
isInfoEnabled()
|
protected boolean |
isLoggableFor(LogLevel requestedLevel)
Check if logging is allowed. |
boolean |
isWarnEnabled()
|
void |
log(Object source,
LogLevel level,
String msg)
|
void |
removeLoggerEventListener(LoggerEventListener listener)
Remove listener on logger events. |
void |
setLogLevel(LogLevel level)
Set the minimum log level. |
void |
warn(Object source,
String arg0)
Log a message at the WARN level. |
void |
warn(Object source,
String arg0,
Throwable arg1)
Log an exception (throwable) at the WARN level with an accompanying message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.arakhne.logging.Logger |
|---|
getName, log |
| Constructor Detail |
|---|
public AbstractLogger()
| Method Detail |
|---|
protected final boolean isLoggableFor(LogLevel requestedLevel)
requestedLevel - is the level to check.
true if logging is allowed, false otherwisepublic void setLogLevel(LogLevel level)
setLogLevel in interface Loggerpublic final LogLevel getLogLevel()
getLogLevel in interface Logger
public final void debug(Object source,
String arg0,
Throwable arg1)
debug in interface Loggersource - - the object which send this logarg0 - the message accompanying the exceptionarg1 - the exception (throwable) to log
public final void debug(Object source,
String arg0)
debug in interface Loggersource - - the object which send this logarg0 - the message string to be logged
public final void error(Object source,
String arg0,
Throwable arg1)
error in interface Loggersource - - the object which send this logarg0 - the message accompanying the exceptionarg1 - the exception (throwable) to log
public final void error(Object source,
String arg0)
error in interface Loggersource - - the object which send this logarg0 - the message string to be logged
public final void info(Object source,
String arg0,
Throwable arg1)
info in interface Loggersource - - the object which send this logarg0 - the message accompanying the exceptionarg1 - the exception (throwable) to log
public final void info(Object source,
String arg0)
info in interface Loggersource - - the object which send this logarg0 - the message string to be logged
public final void warn(Object source,
String arg0,
Throwable arg1)
warn in interface Loggersource - - the object which send this logarg0 - the message accompanying the exceptionarg1 - the exception (throwable) to log
public final void warn(Object source,
String arg0)
warn in interface Loggersource - - the object which send this logarg0 - the message string to be logged
public void log(Object source,
LogLevel level,
String msg)
log in interface Loggersource - - the object which send this loglevel - - the log levelmsg - - the message to logpublic boolean isDebugEnabled()
isDebugEnabled in interface Loggerpublic boolean isErrorEnabled()
isErrorEnabled in interface Loggerpublic boolean isInfoEnabled()
isInfoEnabled in interface Loggerpublic boolean isWarnEnabled()
isWarnEnabled in interface Loggerpublic final void addLoggerEventListener(LoggerEventListener listener)
addLoggerEventListener in interface Loggerlistener - public void removeLoggerEventListener(LoggerEventListener listener)
removeLoggerEventListener in interface Loggerlistener -
protected final void fireLoggerEvent(Object source,
LogLevel level,
String message)
source - is the object which has log the message.level - is the level of the messagemessage - is the text of the message.
protected final void fireLoggerEvent(Object source,
LogLevel level,
String message,
Throwable exception)
source - is the object which has log the message.level - is the level of the messagemessage - is the text of the message.exception - is the exception associated to the message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||