public interface Logger
LoggerFactory
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message)
Log a message at debug level.
|
void |
debug(Object message,
Throwable exception)
Log a message at debug level.
|
void |
debug(String message,
Object... args)
Log a formatted message at debug level.
|
void |
error(Object message)
Log a message at error level.
|
void |
error(Object message,
Throwable exception)
Log a message at error level.
|
void |
error(String message,
Object... args)
Log a formatted message at debug level.
|
void |
fatal(Object message)
Log a message at fatal level.
|
void |
fatal(Object message,
Throwable exception)
Log a message at fatal level.
|
void |
fatal(String message,
Object... args)
Log a formatted message at debug level.
|
String |
getName()
Get the name of this logger.
|
void |
info(Object message)
Log a message at info level.
|
void |
info(Object message,
Throwable exception)
Log a message at info level.
|
void |
info(String message,
Object... args)
Log a formatted message at info level.
|
boolean |
isDebugEnabled()
Checks whether DEBUG logging is enabled.
|
boolean |
isInfoEnabled()
Checks whether INFO logging is enabled.
|
boolean |
isTraceEnabled()
Checks whether TRACE logging is enabled.
|
void |
log(Level level,
Object message)
Log a message at the specified level.
|
void |
log(Level level,
Object message,
Throwable exception)
Log a message at the specified level.
|
void |
trace(Object message)
Log a message at trace level.
|
void |
trace(Object message,
Throwable exception)
Log a message at trace level.
|
void |
trace(String message,
Object... args)
Log a formatted message at trace level.
|
void |
warn(Object message)
Log a message at warning level.
|
void |
warn(Object message,
Throwable exception)
Log a message at warning level.
|
void |
warn(String message,
Object... args)
Log a formatted message at debug level.
|
String getName()
boolean isDebugEnabled()
if (log.isDebugEnabled()) {
... expensive code here ...
log.debug(result);
}
boolean isInfoEnabled()
if (log.isInfoEnabled()) {
... expensive code here ...
log.info(result);
}
boolean isTraceEnabled()
if (log.isTraceEnabled()) {
... expensive code here ...
log.trace(result);
}
void log(Level level, Object message, Throwable exception)
level
- the level at which to logmessage
- the message to logexception
- an exception that caused the messagevoid log(Level level, Object message)
level
- the level at which to logmessage
- the message to logvoid trace(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid trace(Object message)
message
- the message to logvoid trace(String message, Object... args)
message
- the message to logargs
- the arguments for that messagevoid debug(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid debug(Object message)
message
- the message to logvoid debug(String message, Object... args)
message
- the message to logargs
- the arguments for that messagevoid info(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid info(Object message)
message
- the message to logvoid info(String message, Object... args)
message
- the message to logargs
- the arguments for that messagevoid warn(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid warn(Object message)
message
- the message to logvoid warn(String message, Object... args)
message
- the message to logargs
- the arguments for that messagevoid error(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid error(Object message)
message
- the message to logvoid error(String message, Object... args)
message
- the message to logargs
- the arguments for that messagevoid fatal(Object message, Throwable exception)
message
- the message to logexception
- the exception that caused the message to be generatedvoid fatal(Object message)
message
- the message to logCopyright © 2017. All rights reserved.