@GwtCompatible public class Logging extends Object
Constructor and Description |
---|
Logging() |
Modifier and Type | Method and Description |
---|---|
static Logger |
getLogger()
Get the
Logger instance. |
static MappedDiagnosticContext |
getMappedDiagnosticContext()
Get the
MappedDiagnosticContext instance. |
static void |
init(Logger logger)
Initialization of the
Logger . |
static void |
initMDC(MappedDiagnosticContext mdc)
Initialization of the
MappedDiagnosticContext . |
static boolean |
isDebugEnabled(Class<?> clazz)
Check whether the DEBUG level is enabled for the given class.
|
static boolean |
isInfoEnabled(Class<?> logger)
Check whether the INFO level is enabled for the given class.
|
static boolean |
isTraceEnabled(Class<?> clazz)
Check whether the TRACE level is enabled for the given class.
|
static boolean |
isWarnEnabled(Class<?> logger)
Check whether the WARN level is enabled for the given class.
|
static void |
logDebug(String message,
Class<?> logger)
Checks first whether the DEBUG level is enabled for the given class.
|
static void |
logDebug(String message,
Throwable cause,
Class<?> logger)
Checks first whether the DEBUG level is enabled for the given class.
|
static void |
logError(String message,
Class<?> logger)
Logs the given error message for the given class.
|
static void |
logError(String message,
Throwable cause,
Class<?> logger)
Logs the error message and the stack trace which causes the message for the given class.
|
static void |
logFatal(String message,
Class<?> logger)
Logs the given fatal message for the given class.
|
static void |
logFatal(String message,
Throwable cause,
Class<?> logger)
Logs the fatal message and the stack trace which causes the message for the given class.
|
static void |
logInfo(String message,
Class<?> logger)
Checks first whether the INFO level is enabled for the given class.
|
static void |
logInfo(String message,
Throwable cause,
Class<?> logger)
Checks first whether the INFO level is enabled for the given class.
|
static void |
logTrace(String message,
Class<?> logger)
Checks first whether the TRACE level is enabled for the given class.
|
static void |
logTrace(String message,
Throwable cause,
Class<?> logger)
Checks first whether the TRACE level is enabled for the given class.
|
static void |
logWarning(String message,
Class<?> logger)
Checks first whether the WARN level is enabled for the given class.
|
static void |
logWarning(String message,
Throwable cause,
Class<?> logger)
Checks first whether the WARN level is enabled for the given class.
|
public static boolean isTraceEnabled(@NotNull Class<?> clazz)
clazz
- The class for which is checked if the TRACE level is enabled.public static void logTrace(@NotNull String message, @NotNull Class<?> logger)
message
- The message that should be logged.clazz
- The class for which the message should be logged.public static void logTrace(@NotNull String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace that causes the message.logger
- The class for which the message and the stack trace should be logged.public static boolean isDebugEnabled(@NotNull Class<?> clazz)
clazz
- The class for which is checked if the DEBUG level is enabled.public static void logDebug(String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace that causes the message.logger
- The class for which the message and the stack trace should be logged.public static void logDebug(String message, @NotNull Class<?> logger)
message
- The message that should be logged.logger
- The class for which the message should be logged.public static boolean isInfoEnabled(@NotNull Class<?> logger)
logger
- The class for which is checked if the INFO level is enabled.public static void logInfo(String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace that causes the message.logger
- The class for which the message and the stack trace should be logged.public static void logInfo(String message, @NotNull Class<?> logger)
message
- The message that should be logged.logger
- The class for which the message should be logged.public static boolean isWarnEnabled(@NotNull Class<?> logger)
logger
- The class for which is checked if the WARN level is enabled.public static void logWarning(String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace that causes the message.logger
- The class for which the message and the stack trace should be logged.public static void logWarning(String message, @NotNull Class<?> logger)
message
- The message that should be logged.logger
- The class for that the message should be logged.public static void logError(String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace which causes the message.logger
- The class for which the message and the stack trace should be logged.public static void logError(String message, @NotNull Class<?> logger)
message
- The message that should be logged.logger
- The class for that the message should be logged.public static void logFatal(@NotNull String message, @NotNull Class<?> logger)
message
- The message that should be logged.logger
- The class for that the message should be logged.public static void logFatal(@NotNull String message, Throwable cause, @NotNull Class<?> logger)
message
- The message that should be logged.cause
- The stack trace that causes the message.logger
- The class for that the message and the stack trace should be logged.public static void init(@Nullable Logger logger)
Logger
. If the given logger is null, a default value is used.logger
- The given logger; could be null.public static void initMDC(MappedDiagnosticContext mdc)
MappedDiagnosticContext
. If the given MappedDiagnosticContext is null, a default value is used.mdc
- The given MappedDiagnosticContext
; could be null.@NotNull public static Logger getLogger()
Logger
instance.Logger
init(Logger)
@NotNull public static MappedDiagnosticContext getMappedDiagnosticContext()
MappedDiagnosticContext
instance.MappedDiagnosticContext
initMDC(MappedDiagnosticContext)
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210