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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA LogLevel is used to describe the severity of an event that is being logged. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisDebugEnabled(@NotNull Class<?> logger) Checks whether logging withdebuglevel is enabled for the supplied class.booleanisDebugEnabled(@NotNull String name) Checks whether logging withdebuglevel is enabled for the supplied logger name.booleanisInfoEnabled(@NotNull Class<?> logger) Checks whether logging withinfolevel is enabled for the supplied class.booleanisInfoEnabled(@NotNull String name) Checks whether logging withinfolevel is enabled for the supplied logger name.booleanisTraceEnabled(@NotNull Class<?> logger) Checks whether logging withtracelevel is enabled for the supplied class.booleanisTraceEnabled(@NotNull String name) Checks whether logging withtracelevel is enabled for the supplied logger name.booleanisWarnEnabled(@NotNull Class<?> logger) Checks whether logging withwarnlevel is enabled for the supplied class.booleanisWarnEnabled(@NotNull String name) Checks whether logging withwarnlevel is enabled for the supplied logger name.voidLogs a message withdebuglevel using the logger for the supplied class.voidLogs a message withdebuglevel using the logger with the supplied name.voidvoidvoidLogs a message witherrorlevel using the logger for the supplied class.voidLogs a message witherrorlevel using the logger with the supplied name.voidvoidvoidLogs a message withfatallevel using the logger for the supplied class.voidLogs a message withfatallevel using the logger with the supplied name.voidvoidvoidLogs a message withinfolevel using the logger for the supplied class.voidLogs a message withinfolevel using the logger with the supplied name.voidvoidvoidLogs a message withtracelevel using the logger for the supplied class.voidLogs a message withtracelevel using the logger with the supplied name.voidvoidvoidlogWarning(@NotNull String message, @NotNull Class<?> logger) Logs a message withwarnlevel using the logger for the supplied class.voidlogWarning(@NotNull String message, @NotNull String name) Logs a message withwarnlevel using the logger with the supplied name.voidlogWarning(@NotNull String message, @NotNull Throwable cause, @NotNull Class<?> logger) voidlogWarning(@NotNull String message, @NotNull Throwable cause, @NotNull String name)
-
Method Details
-
isTraceEnabled
Checks whether logging withtracelevel 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:
trueif logging withtracelevel is enabled for the supplied class,falseotherwise.- Since:
- 4.2.38
-
isTraceEnabled
Checks whether logging withtracelevel 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:
trueif logging withtracelevel is enabled for the supplied logger name,falseotherwise.- Since:
- 5.2.230406
-
logTrace
Logs a message withtracelevel 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 withtracelevel 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 suppliedThrowablewithtracelevel 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 suppliedThrowablewithtracelevel 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 withdebuglevel 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:
trueif logging withdebuglevel is enabled for the supplied class,falseotherwise.- Since:
- 4.2.38
-
isDebugEnabled
Checks whether logging withdebuglevel 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:
trueif logging withdebuglevel is enabled for the supplied logger name,falseotherwise.- 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 suppliedThrowablewithdebuglevel 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 suppliedThrowablewithdebuglevel 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 withdebuglevel 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 withdebuglevel 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 withinfolevel 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:
trueif logging withinfolevel is enabled for the supplied class,falseotherwise.- Since:
- 4.2.38
-
isInfoEnabled
Checks whether logging withinfolevel 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:
trueif logging withinfolevel is enabled for the supplied logger name,falseotherwise.- 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 suppliedThrowablewithinfolevel 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 suppliedThrowablewithinfolevel 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 withinfolevel 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 withinfolevel 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 withwarnlevel 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:
trueif logging withwarnlevel is enabled for the supplied class,falseotherwise.- Since:
- 4.2.38
-
isWarnEnabled
Checks whether logging withwarnlevel 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:
trueif logging withwarnlevel is enabled for the supplied logger name,falseotherwise.- 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 suppliedThrowablewithwarnlevel 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 suppliedThrowablewithwarnlevel 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 withwarnlevel 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 withwarnlevel 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 suppliedThrowablewitherrorlevel 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 suppliedThrowablewitherrorlevel 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 witherrorlevel 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 witherrorlevel 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 withfatallevel 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 withfatallevel 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 suppliedThrowablewithfatallevel 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 suppliedThrowablewithfatallevel 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
-