|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.acelogger.BaseLogger
public abstract class BaseLogger
Abstracts all common tasks for Logger
.
Constructor Summary | |
---|---|
protected |
BaseLogger(String identifier)
Constructs a new BaseLogger using the supplied identifier, an empty appender, a "deny all" level filter and an empty location gatherer. |
protected |
BaseLogger(String identifier,
Appender appender,
LevelFilter filter,
LocationGatherer gatherer)
Constructs a new BaseLogger using the supplied identifier, appender, level filter and location gatherer. |
Method Summary | |
---|---|
void |
debug(String message,
Object... params)
Creates a debug level log message, the final message will depend on the underlying Formatter and parameters. |
void |
debug(String message,
Throwable cause,
Object... params)
Creates a debug level log message, the final message will depend on the underlying Formatter and parameters. |
void |
error(String message,
Object... params)
Creates a error level log message, the final message will depend on the underlying Formatter and parameters. |
void |
error(String message,
Throwable cause,
Object... params)
Creates a error level log message, the final message will depend on the underlying Formatter and parameters. |
void |
fatal(String message,
Object... params)
Creates a fatal level log message, the final message will depend on the underlying Formatter and parameters. |
void |
fatal(String message,
Throwable cause,
Object... params)
Creates a fatal level log message, the final message will depend on the underlying Formatter and parameters. |
protected LogEvent |
generateLogCall(String message,
Object[] params,
LogLevel level)
Generates a log call based on the supplied information. |
protected LogEvent |
generateLogCall(String message,
Object[] params,
LogLevel level,
Throwable cause)
Generates a log call based on the supplied information. |
protected LogEvent |
generateLogCall(String message,
Object[] params,
LogLevel level,
Throwable cause,
Thread currenThread)
Generates a log call based on the supplied information. |
Appender |
getAppender()
Returns the log appender used within this logger. |
LocationGatherer |
getGatherer()
Returns the location gatherer used within this logger. |
String |
getIdentifier()
Gets a String that identifies this object. |
LevelFilter |
getThreshold()
Returns the level filter used within this logger. |
void |
info(String message,
Object... params)
Creates a information level log message, the final message will depend on the underlying Formatter. |
void |
info(String message,
Throwable cause,
Object... params)
Creates a information level log message, the final message will depend on the underlying Formatter. |
boolean |
isDebugEnabled()
Checks the suitability of the debug level for this Logger. |
boolean |
isErrorEnabled()
Checks the suitability of the error level for this Logger. |
boolean |
isFatalEnabled()
Checks the suitability of the fatal level for this Logger. |
boolean |
isInfoEnabled()
Checks the suitability of the information level for this Logger. |
boolean |
isTraceEnabled()
Checks the suitability of the tracing level for this Logger. |
boolean |
isWarnEnabled()
Checks the suitability of the warning level for this Logger. |
void |
setGatherer(LocationGatherer gatherer)
Sets the location gatherer used within this logger. |
void |
setThreshold(LevelFilter filter)
Sets the level filter used within this logger. |
void |
trace(String message,
Object... params)
Creates a tracing level log message, the final message will depend on the underlying Formatter. |
void |
trace(String message,
Throwable cause,
Object... params)
Creates a tracing level log message, the final message will depend on the underlying Formatter. |
void |
warn(String message,
Object... params)
Creates a warning level log message, the final message will depend on the underlying Formatter. |
void |
warn(String message,
Throwable cause,
Object... params)
Creates a warning level log message, the final message will depend on the underlying Formatter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BaseLogger(String identifier)
identifier
- A string that identifies this logger.protected BaseLogger(String identifier, Appender appender, LevelFilter filter, LocationGatherer gatherer)
identifier
- A string that identifies this logger.appender
- The Appender
that will be used within this logger.filter
- The LevelFilter
that will be used within this logger.gatherer
- The LocationGatherer
that will be used within this logger.Method Detail |
---|
public final LevelFilter getThreshold()
LevelFilter
used within this logger.public final void setThreshold(LevelFilter filter)
filter
- The LevelFilter
that will be used within this logger.public final LocationGatherer getGatherer()
LocationGatherer
used within this logger.public final void setGatherer(LocationGatherer gatherer)
gatherer
- The LocationGatherer
that will be used within this logger.public final String getIdentifier()
getIdentifier
in interface Identifiable
public final Appender getAppender()
Appender
used within this logger.protected final LogEvent generateLogCall(String message, Object[] params, LogLevel level)
message
- The message to be logged.params
- The parameters that should be available for formatting.level
- The level of the log call.
LogEvent
generated with the supplied information.protected final LogEvent generateLogCall(String message, Object[] params, LogLevel level, Throwable cause)
message
- The message to be logged.params
- The parameters that should be available for formatting.level
- The level of the log call.cause
- The origin of the reported problem.
LogEvent
generated with the supplied information.protected final LogEvent generateLogCall(String message, Object[] params, LogLevel level, Throwable cause, Thread currenThread)
message
- The message to be logged.params
- The parameters that should be available for formatting.level
- The level of the log call.cause
- The origin of the reported problem.currenThread
- The Thread where the log call was originated.
LogEvent
generated with the supplied information.public final boolean isDebugEnabled()
isDebugEnabled
in interface Logger
public final boolean isErrorEnabled()
isErrorEnabled
in interface Logger
public final boolean isFatalEnabled()
isFatalEnabled
in interface Logger
public final boolean isInfoEnabled()
isInfoEnabled
in interface Logger
public final boolean isTraceEnabled()
isTraceEnabled
in interface Logger
public final boolean isWarnEnabled()
isWarnEnabled
in interface Logger
public final void debug(String message, Object... params)
debug
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void debug(String message, Throwable cause, Object... params)
debug
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.public final void error(String message, Object... params)
error
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void error(String message, Throwable cause, Object... params)
error
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.public final void fatal(String message, Object... params)
fatal
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void fatal(String message, Throwable cause, Object... params)
fatal
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.public final void info(String message, Object... params)
info
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void info(String message, Throwable cause, Object... params)
info
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.public final void trace(String message, Object... params)
trace
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void trace(String message, Throwable cause, Object... params)
trace
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.public final void warn(String message, Object... params)
warn
in interface Logger
message
- The message to be formatted and then logged.params
- The list of parameter used to format the message.public final void warn(String message, Throwable cause, Object... params)
warn
in interface Logger
message
- The message to be formatted and then logged.cause
- The Throwable that originated this log call.params
- The list of parameter used to format the message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |