Package de.espirit.common.base
Interface Logger
@GwtCompatible
@NonExtendable
public interface Logger
Interface that describes a general logger that is capable of logging with different severity levels.
- Since:
- 4.2.38
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
A LogLevel is used to describe the severity of an event that is being logged. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isDebugEnabled
(@NotNull Class<?> logger) Checks whether logging withdebug
level is enabled for the supplied class.boolean
isDebugEnabled
(@NotNull String name) Checks whether logging withdebug
level is enabled for the supplied logger name.boolean
isInfoEnabled
(@NotNull Class<?> logger) Checks whether logging withinfo
level is enabled for the supplied class.boolean
isInfoEnabled
(@NotNull String name) Checks whether logging withinfo
level is enabled for the supplied logger name.boolean
isTraceEnabled
(@NotNull Class<?> logger) Checks whether logging withtrace
level is enabled for the supplied class.boolean
isTraceEnabled
(@NotNull String name) Checks whether logging withtrace
level is enabled for the supplied logger name.boolean
isWarnEnabled
(@NotNull Class<?> logger) Checks whether logging withwarn
level is enabled for the supplied class.boolean
isWarnEnabled
(@NotNull String name) Checks whether logging withwarn
level is enabled for the supplied logger name.void
Logs a message withdebug
level using the logger for the supplied class.void
Logs a message withdebug
level using the logger with the supplied name.void
void
void
Logs a message witherror
level using the logger for the supplied class.void
Logs a message witherror
level using the logger with the supplied name.void
void
void
Logs a message withfatal
level using the logger for the supplied class.void
Logs a message withfatal
level using the logger with the supplied name.void
void
void
Logs a message withinfo
level using the logger for the supplied class.void
Logs a message withinfo
level using the logger with the supplied name.void
void
void
Logs a message withtrace
level using the logger for the supplied class.void
Logs a message withtrace
level using the logger with the supplied name.void
void
void
logWarning
(@NotNull String message, @NotNull Class<?> logger) Logs a message withwarn
level using the logger for the supplied class.void
logWarning
(@NotNull String message, @NotNull String name) Logs a message withwarn
level using the logger with the supplied name.void
logWarning
(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger) void
logWarning
(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
-
Method Details
-
isTraceEnabled
Checks whether logging withtrace
level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
logger
- Class to be checked.- Returns:
true
if logging withtrace
level is enabled for the supplied class,false
otherwise.- Since:
- 4.2.38
-
isTraceEnabled
Checks whether logging withtrace
level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
name
- Logger name to be checked.- Returns:
true
if logging withtrace
level is enabled for the supplied logger name,false
otherwise.- Since:
- 5.2.230406
-
logTrace
Logs a message withtrace
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logTrace
Logs a message withtrace
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logTrace
Logs a message as well as the suppliedThrowable
withtrace
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logTrace
void logTrace(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
withtrace
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
isDebugEnabled
Checks whether logging withdebug
level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
logger
- Class to be checked.- Returns:
true
if logging withdebug
level is enabled for the supplied class,false
otherwise.- Since:
- 4.2.38
-
isDebugEnabled
Checks whether logging withdebug
level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
name
- Logger name to be checked.- Returns:
true
if logging withdebug
level is enabled for the supplied logger name,false
otherwise.- Since:
- 5.2.230406
-
logDebug
void logDebug(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger) Logs a message as well as the suppliedThrowable
withdebug
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logDebug
void logDebug(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
withdebug
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logDebug
Logs a message withdebug
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logDebug
Logs a message withdebug
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
isInfoEnabled
Checks whether logging withinfo
level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
logger
- Class to be checked.- Returns:
true
if logging withinfo
level is enabled for the supplied class,false
otherwise.- Since:
- 4.2.38
-
isInfoEnabled
Checks whether logging withinfo
level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
name
- Logger name to be checked.- Returns:
true
if logging withinfo
level is enabled for the supplied logger name,false
otherwise.- Since:
- 5.2.230406
-
logInfo
void logInfo(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger) Logs a message as well as the suppliedThrowable
withinfo
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logInfo
void logInfo(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
withinfo
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logInfo
Logs a message withinfo
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logInfo
Logs a message withinfo
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
isWarnEnabled
Checks whether logging withwarn
level is enabled for the supplied class. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
logger
- Class to be checked.- Returns:
true
if logging withwarn
level is enabled for the supplied class,false
otherwise.- Since:
- 4.2.38
-
isWarnEnabled
Checks whether logging withwarn
level is enabled for the supplied logger name. This method can be used to prevent unnecessary expensive message creation if the level is not enabled.- Parameters:
name
- Logger name to be checked.- Returns:
true
if logging withwarn
level is enabled for the supplied logger name,false
otherwise.- Since:
- 5.2.230406
-
logWarning
void logWarning(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger) Logs a message as well as the suppliedThrowable
withwarn
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logWarning
void logWarning(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
withwarn
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logWarning
Logs a message withwarn
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logWarning
Logs a message withwarn
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logError
void logError(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger) Logs a message as well as the suppliedThrowable
witherror
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logError
void logError(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
witherror
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logError
Logs a message witherror
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logError
Logs a message witherror
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logFatal
Logs a message withfatal
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logFatal
Logs a message withfatal
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.name
- Name of the logger to be used.- Since:
- 5.2.230406
-
logFatal
void logFatal(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull Class<?> logger) Logs a message as well as the suppliedThrowable
withfatal
level using the logger for the supplied class.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.logger
- Class to find the logger to be used.- Since:
- 4.2.38
-
logFatal
void logFatal(@NotNull @NotNull String message, @NotNull @NotNull Throwable cause, @NotNull @NotNull String name) Logs a message as well as the suppliedThrowable
withfatal
level using the logger with the supplied name.- Parameters:
message
- Message to be logged.cause
- Throwable to be logged, including its stack trace.name
- Name of the logger to be used.- Since:
- 5.2.230406
-