Package software.amazon.awssdk.utils
Class Logger
java.lang.Object
software.amazon.awssdk.utils.Logger
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks if debug is enabled and if so logs the supplied messagevoid
Checks if debug is enabled and if so logs the supplied message and exceptionvoid
Checks if error is enabled and if so logs the supplied messagevoid
Checks if error is enabled and if so logs the supplied message and exceptionvoid
Checks if info is enabled and if so logs the supplied messagevoid
Checks if info is enabled and if so logs the supplied message and exceptionboolean
isLoggingLevelEnabled
(String logLevel) Determines if the log-level passed is enabledboolean
isLoggingLevelEnabled
(org.slf4j.event.Level logLevel) Determines if the provided log-level is enabled.void
Log a message at the given log level (if it is enabled).org.slf4j.Logger
logger()
static Logger
Static factory to get a logger instance for a given classstatic Logger
Static factory to get a logger instance with a specific name.void
Checks if trace is enabled and if so logs the supplied messagevoid
Checks if trace is enabled and if so logs the supplied message and exceptionvoid
Checks if warn is enabled and if so logs the supplied messagevoid
Checks if warn is enabled and if so logs the supplied message and exception
-
Method Details
-
logger
public org.slf4j.Logger logger() -
info
Checks if info is enabled and if so logs the supplied message- Parameters:
msg
- - supplier for the log message
-
info
Checks if info is enabled and if so logs the supplied message and exception- Parameters:
msg
- - supplier for the log messagethrowable
- - a throwable to log
-
error
Checks if error is enabled and if so logs the supplied message- Parameters:
msg
- - supplier for the log message
-
error
Checks if error is enabled and if so logs the supplied message and exception- Parameters:
msg
- - supplier for the log messagethrowable
- - a throwable to log
-
debug
Checks if debug is enabled and if so logs the supplied message- Parameters:
msg
- - supplier for the log message
-
debug
Checks if debug is enabled and if so logs the supplied message and exception- Parameters:
msg
- - supplier for the log messagethrowable
- - a throwable to log
-
warn
Checks if warn is enabled and if so logs the supplied message- Parameters:
msg
- - supplier for the log message
-
warn
Checks if warn is enabled and if so logs the supplied message and exception- Parameters:
msg
- - supplier for the log messagethrowable
- - a throwable to log
-
trace
Checks if trace is enabled and if so logs the supplied message- Parameters:
msg
- - supplier for the log message
-
trace
Checks if trace is enabled and if so logs the supplied message and exception- Parameters:
msg
- - supplier for the log messagethrowable
- - a throwable to log
-
isLoggingLevelEnabled
public boolean isLoggingLevelEnabled(org.slf4j.event.Level logLevel) Determines if the provided log-level is enabled.- Parameters:
logLevel
- the SLF4J log level enum- Returns:
- whether that level is enabled
-
isLoggingLevelEnabled
Determines if the log-level passed is enabled- Parameters:
logLevel
- a string representation of the log level, e.g. "debug"- Returns:
- whether or not that level is enable
-
log
Log a message at the given log level (if it is enabled).- Parameters:
logLevel
- the SLF4J log levelmsg
- supplier for the log message
-
loggerFor
Static factory to get a logger instance for a given class- Parameters:
clz
- - class to get the logger for- Returns:
- a Logger instance
-
loggerFor
Static factory to get a logger instance with a specific name.- Parameters:
name
- - The name of the logger to create- Returns:
- a Logger instance
-