Interface Logger
public interface Logger
Defines a logging interface with methods for logging at various levels such as trace, debug,
info, warn, and error. Provides methods to check if a specific logging level is enabled, allowing
conditional logging based on the current configuration.
- Since:
- 2.5.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message at the debug level.voidLogs a message at the error level.voidLogs a message and a throwable at the error level.voidLogs a message at the info level.booleanReturns whether debug logging is enabled.booleanReturns whether error logging is enabled.booleanReturns whether info logging is enabled.booleanReturns whether trace logging is enabled.booleanReturns whether warn logging is enabled.voidLogs a message at the trace level.voidLogs a message at the warn level.voidLogs a message and a throwable at the warn level.
-
Method Details
-
isTraceEnabled
boolean isTraceEnabled()Returns whether trace logging is enabled.- Returns:
- true if trace is enabled, false otherwise
- Since:
- 2.5.0
-
isDebugEnabled
boolean isDebugEnabled()Returns whether debug logging is enabled.- Returns:
- true if debug is enabled, false otherwise
- Since:
- 2.5.0
-
isInfoEnabled
boolean isInfoEnabled()Returns whether info logging is enabled.- Returns:
- true if info is enabled, false otherwise
- Since:
- 2.5.0
-
isWarnEnabled
boolean isWarnEnabled()Returns whether warn logging is enabled.- Returns:
- true if warn is enabled, false otherwise
- Since:
- 2.5.0
-
isErrorEnabled
boolean isErrorEnabled()Returns whether error logging is enabled.- Returns:
- true if error is enabled, false otherwise
- Since:
- 2.5.0
-
trace
Logs a message at the trace level.- Parameters:
message- the message to logargs- the arguments to format the message- Since:
- 2.5.0
-
debug
Logs a message at the debug level.- Parameters:
message- the message to logargs- the arguments to format the message- Since:
- 2.5.0
-
info
Logs a message at the info level.- Parameters:
message- the message to logargs- the arguments to format the message- Since:
- 2.5.0
-
warn
Logs a message at the warn level.- Parameters:
message- the message to logargs- the arguments to format the message- Since:
- 2.5.0
-
error
Logs a message at the error level.- Parameters:
message- the message to logargs- the arguments to format the message- Since:
- 2.5.0
-
warn
Logs a message and a throwable at the warn level.- Parameters:
message- the message to logthrowable- the throwable to logargs- the arguments to format the message- Since:
- 2.5.0
-
error
Logs a message and a throwable at the error level.- Parameters:
message- the message to logthrowable- the throwable to logargs- the arguments to format the message- Since:
- 2.5.0
-