public interface Logger
Modifier and Type | Interface and Description |
---|---|
static class |
Logger.Level
Logger level.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(java.lang.String message)
Logs a message at DEBUG level.
|
default void |
debug(java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at DEBUG level.
|
void |
error(java.lang.String message)
Logs a message at ERROR level.
|
void |
error(java.lang.String message,
java.lang.Throwable throwable)
Logs a message at ERROR level.
|
default void |
error(java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at ERROR level.
|
default void |
error(java.util.function.Supplier<java.lang.String> messageSupplier,
java.lang.Throwable throwable)
Logs a message at ERROR level.
|
java.lang.String |
getName()
Returns the logger name.
|
void |
info(java.lang.String message)
Logs a message at INFO level.
|
default void |
info(java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at INFO level.
|
boolean |
isDebugEnabled()
Returns
true if DEBUG level is enabled. |
boolean |
isEnabled(Logger.Level level)
Returns
true if certain logging
level is enabled. |
boolean |
isErrorEnabled()
Returns
true if ERROR level is enabled. |
boolean |
isInfoEnabled()
Returns
true if INFO level is enabled. |
boolean |
isTraceEnabled()
Returns
true if TRACE level is enabled. |
boolean |
isWarnEnabled()
Returns
true if WARN level is enabled. |
void |
log(Logger.Level level,
java.lang.String message)
Logs a message at provided logging level.
|
void |
log(Logger.Level level,
java.lang.String message,
java.lang.Throwable throwable)
Logs a message and displays exception info.
|
default void |
log(Logger.Level level,
java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at provided logging level.
|
default void |
log(Logger.Level level,
java.util.function.Supplier<java.lang.String> messageSupplier,
java.lang.Throwable throwable)
Logs a message and displays exception info.
|
void |
setLevel(Logger.Level level)
Sets new level dynamically.
|
void |
trace(java.lang.String message)
Logs a message at TRACE level.
|
default void |
trace(java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at TRACE level.
|
void |
warn(java.lang.String message)
Logs a message at WARN level.
|
void |
warn(java.lang.String message,
java.lang.Throwable throwable)
Logs a message at WARN level.
|
default void |
warn(java.util.function.Supplier<java.lang.String> messageSupplier)
Logs a message at WARN level.
|
default void |
warn(java.util.function.Supplier<java.lang.String> messageSupplier,
java.lang.Throwable throwable)
Logs a message at WARN level.
|
java.lang.String getName()
boolean isEnabled(Logger.Level level)
true
if certain logging
level is enabled.void log(Logger.Level level, java.lang.String message)
default void log(Logger.Level level, java.util.function.Supplier<java.lang.String> messageSupplier)
void log(Logger.Level level, java.lang.String message, java.lang.Throwable throwable)
default void log(Logger.Level level, java.util.function.Supplier<java.lang.String> messageSupplier, java.lang.Throwable throwable)
void setLevel(Logger.Level level)
boolean isTraceEnabled()
true
if TRACE level is enabled.void trace(java.lang.String message)
default void trace(java.util.function.Supplier<java.lang.String> messageSupplier)
boolean isDebugEnabled()
true
if DEBUG level is enabled.void debug(java.lang.String message)
default void debug(java.util.function.Supplier<java.lang.String> messageSupplier)
boolean isInfoEnabled()
true
if INFO level is enabled.void info(java.lang.String message)
default void info(java.util.function.Supplier<java.lang.String> messageSupplier)
boolean isWarnEnabled()
true
if WARN level is enabled.void warn(java.lang.String message)
void warn(java.lang.String message, java.lang.Throwable throwable)
default void warn(java.util.function.Supplier<java.lang.String> messageSupplier)
default void warn(java.util.function.Supplier<java.lang.String> messageSupplier, java.lang.Throwable throwable)
boolean isErrorEnabled()
true
if ERROR level is enabled.void error(java.lang.String message)
void error(java.lang.String message, java.lang.Throwable throwable)
default void error(java.util.function.Supplier<java.lang.String> messageSupplier)
default void error(java.util.function.Supplier<java.lang.String> messageSupplier, java.lang.Throwable throwable)
Copyright © 2003-present Jodd Team