- All Known Implementing Classes:
DefaultLogging
public interface Logging
Logging interface
- Author:
- Leonard Woo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int"DEBUG" level logging.static final int"ERROR" level logging.static final int"FATAL" level logging.static final int"INFO" level logging.static final int"TRACE" level logging.static final int"WARN" level logging. -
Method Summary
Modifier and TypeMethodDescriptionatDebug()Level DEBUGatError()Level ERRORatFatal()Level FATALatInfo()Level INFOatTrace()Level TRACEatWarn()Level WARNvoiddebug(CharSequence message) Logs a message with the DEBUG level.voiddebug(CharSequence message, Throwable cause) Logs a message at the DEBUG level including the stack trace of the Throwable.voiddebug(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the DEBUG level with parameters, including the stack trace of the Throwable.voiderror(CharSequence message) Logs a message with the ERROR level.voiderror(CharSequence message, Throwable cause) Logs a message at the ERROR level including the stack trace of the Throwable.voiderror(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the ERROR level with parameters, including the stack trace of the Throwable.voidfatal(CharSequence message) Logs a message with the FATAL level.voidfatal(CharSequence message, Throwable cause) Logs a message at the FATAL level including the stack trace of the Throwable.voidfatal(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the FATAL level with parameters, including the stack trace of the Throwable.getName()Get logging namevoidinfo(CharSequence message) Logs a message with the INFO level.voidinfo(CharSequence message, Throwable cause) Logs a message at the INFO level including the stack trace of the Throwable.voidinfo(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the INFO level with parameters, including the stack trace of the Throwable.booleanChecks whether this Logger is enabled for the DEBUG level.booleanisEnable(int level) Checks whether this Logger is enabled for the given Level.booleanChecks whether this Logger is enabled for the ERROR level.booleanChecks whether this Logger is enabled for the FATAL level.booleanChecks whether this Logger is enabled for the INFO level.booleanChecks whether this Logger is enabled for the TRACE level.booleanChecks whether this Logger is enabled for the WARN level.voidlog(int level, CharSequence message) Logs a message with the specific Marker at the given level.voidlog(int level, CharSequence message, Throwable cause) Logs a message with the specific Marker at the given level.voidlog(int level, CharSequence message, Throwable cause, Object... params) Logs a message with the specific Marker at the given level.voidlog(int level, CharSequence message, Throwable cause, Supplier<?>... paramSuppliers) Logs a message with the specific Marker at the given level.voidtrace(CharSequence message) Logs a message with the TRACE level.voidtrace(CharSequence message, Throwable cause) Logs a message at the TRACE level including the stack trace of the Throwable.voidtrace(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the TRACE level with parameters, including the stack trace of the Throwable.voidwarn(CharSequence message) Logs a message with the WARN level.voidwarn(CharSequence message, Throwable cause) Logs a message at the WARN level including the stack trace of the Throwable.voidwarn(CharSequence message, Throwable cause, Supplier<?>... paramsSupplier) Logs a message at the WARN level with parameters, including the stack trace of the Throwable.
-
Field Details
-
LEVEL_TRACE_INT
static final int LEVEL_TRACE_INT"TRACE" level logging.- See Also:
-
LEVEL_DEBUG_INT
static final int LEVEL_DEBUG_INT"DEBUG" level logging.- See Also:
-
LEVEL_INFO_INT
static final int LEVEL_INFO_INT"INFO" level logging.- See Also:
-
LEVEL_WARN_INT
static final int LEVEL_WARN_INT"WARN" level logging.- See Also:
-
LEVEL_ERROR_INT
static final int LEVEL_ERROR_INT"ERROR" level logging.- See Also:
-
LEVEL_FATAL_INT
static final int LEVEL_FATAL_INT"FATAL" level logging.- See Also:
-
-
Method Details
-
getName
String getName()Get logging name- Returns:
- logging name.
-
isEnable
boolean isEnable(int level) Checks whether this Logger is enabled for the given Level.- Parameters:
level- the Level to check.- Returns:
- boolean -
trueif this Logger is enabled for level,falseotherwise.
-
log
Logs a message with the specific Marker at the given level.- Parameters:
level- the logging level.message- the message string to be logged.
-
log
Logs a message with the specific Marker at the given level.- Parameters:
level- the logging level.message- the message string to be logged.cause- A Throwable or'null'.
-
log
Logs a message with the specific Marker at the given level.- Parameters:
level- the logging level.message- the message string to be logged.cause- a Throwable or'null'.paramSuppliers- the parameter Supplier or'null'to be logged.
-
log
Logs a message with the specific Marker at the given level.- Parameters:
level- the logging level.message- the message string to be logged.cause- a Throwable or'null'.params- the parameter objects or'null'to be logged.
-
isTraceEnable
boolean isTraceEnable()Checks whether this Logger is enabled for the TRACE level.- Returns:
- true if this Logger is enabled for level TRACE, false otherwise.
-
trace
Logs a message with the TRACE level.- Parameters:
message- the message object to log.
-
trace
Logs a message at the TRACE level including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
trace
Logs a message at the TRACE level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atTrace
LoggingBuilder atTrace()Level TRACE- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-
isDebugEnable
boolean isDebugEnable()Checks whether this Logger is enabled for the DEBUG level.- Returns:
- true if this Logger is enabled for level DEBUG, false otherwise.
-
debug
Logs a message with the DEBUG level.- Parameters:
message- the message object to log.
-
debug
Logs a message at the DEBUG level including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
debug
Logs a message at the DEBUG level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atDebug
LoggingBuilder atDebug()Level DEBUG- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-
isInfoEnable
boolean isInfoEnable()Checks whether this Logger is enabled for the INFO level.- Returns:
- true if this Logger is enabled for level INFO, false otherwise.
-
info
Logs a message with the INFO level.- Parameters:
message- the message object to log.
-
info
Logs a message at the INFO level including the stack trace of the Throwable. throwable passed as parameter.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
info
Logs a message at the INFO level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atInfo
LoggingBuilder atInfo()Level INFO- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-
isWarnEnable
boolean isWarnEnable()Checks whether this Logger is enabled for the WARN level.- Returns:
- true if this Logger is enabled for level WARN, false otherwise.
-
warn
Logs a message with the WARN level.- Parameters:
message- the message object to log.
-
warn
Logs a message at the WARN level including the stack trace of the Throwable. throwable passed as parameter.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
warn
Logs a message at the WARN level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atWarn
LoggingBuilder atWarn()Level WARN- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-
isErrorEnable
boolean isErrorEnable()Checks whether this Logger is enabled for the ERROR level.- Returns:
- true if this Logger is enabled for level ERROR, false otherwise.
-
error
Logs a message with the ERROR level.- Parameters:
message- the message object to log.
-
error
Logs a message at the ERROR level including the stack trace of the Throwable. throwable passed as parameter.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
error
Logs a message at the ERROR level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atError
LoggingBuilder atError()Level ERROR- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-
isFatalEnable
boolean isFatalEnable()Checks whether this Logger is enabled for the FATAL level.- Returns:
- true if this Logger is enabled for level FATAL, false otherwise.
-
fatal
Logs a message with the FATAL level.- Parameters:
message- the message object to log.
-
fatal
Logs a message at the FATAL level including the stack trace of the Throwable. throwable passed as parameter.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.
-
fatal
Logs a message at the FATAL level with parameters, including the stack trace of the Throwable.- Parameters:
message- the message object to log.cause- the Throwable to log, including its stack trace.paramsSupplier- the parameters to log.
-
atFatal
LoggingBuilder atFatal()Level FATAL- Returns:
- a new
LoggingBuilderinstance as appropriate for this log.
-