public class DefaultExceptionLogger extends Object implements IExceptionLogger
IExceptionLogger
interface. It only
logs the detail message string of the Throwable
instance passed
as the last argument.Modifier | Constructor and Description |
---|---|
protected |
DefaultExceptionLogger()
Constructs the exception logger.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(ILogger logger,
String msg,
Object... args)
Logs a message at the DEBUG level with varying number of arguments.
|
void |
error(ILogger logger,
String msg,
Object... args)
Logs a message at the ERROR level with varying number of arguments.
|
void |
info(ILogger logger,
String msg,
Object... args)
Logs a message at the INFO level with varying number of arguments.
|
protected Object[] |
prepareArguments(Object[] args)
Prepares an array of arguments that will be passed to the logger
currently used by the API.
|
void |
trace(ILogger loggger,
String msg,
Object... args)
Logs a message at the TRACE level with varying number of arguments.
|
void |
warn(ILogger logger,
String msg,
Object... args)
Logs a message at the WARN level with varying number of arguments.
|
protected DefaultExceptionLogger()
protected Object[] prepareArguments(Object[] args)
args
- the original array of the arguments passed by the API. The
last argument in this array is usually an exception object.public void trace(ILogger loggger, String msg, Object... args)
IExceptionLogger
trace
in interface IExceptionLogger
loggger
- the logger that is currently used by the APImsg
- a pattern of the message to be logged that uses the
{}
characters to indicate the place for the
appropriate argumentargs
- the arguments with an exception object at the last positionpublic void debug(ILogger logger, String msg, Object... args)
IExceptionLogger
debug
in interface IExceptionLogger
logger
- the logger that is currently used by the APImsg
- a pattern of the message to be logged that uses the
{}
characters to indicate the place for the
appropriate argumentargs
- the arguments with an exception object at the last positionpublic void info(ILogger logger, String msg, Object... args)
IExceptionLogger
info
in interface IExceptionLogger
logger
- the logger that is currently used by the APImsg
- a pattern of the message to be logged that uses the
{}
characters to indicate the place for the
appropriate argumentargs
- the arguments with an exception object at the last positionpublic void warn(ILogger logger, String msg, Object... args)
IExceptionLogger
warn
in interface IExceptionLogger
logger
- the logger that is currently used by the APImsg
- a pattern of the message to be logged that uses the
{}
characters to indicate the place for the
appropriate argumentargs
- the arguments with an exception object at the last positionpublic void error(ILogger logger, String msg, Object... args)
IExceptionLogger
error
in interface IExceptionLogger
logger
- the logger that is currently used by the APImsg
- a pattern of the message to be logged that uses the
{}
characters to indicate the place for the
appropriate argumentargs
- the arguments with an exception object at the last positionCopyright © 2017–2022 SNF4J.ORG. All rights reserved.