public interface ClientLogger
Note that this API shall not be used to log sensitive data, such as authentication data (passwords, tokens, crypto keys), personal data (user’s name, address, gender, age etc.), or business confidential data (request data). Only necessary metadata about the client program’s execution behavior and not about server behavior and error information shall be written to the log.
E2E tracing information is provided to the logger via the TraceInfo
argument on the various log methods. Each such method has an overloaded variant which accepts an object of this type as
an extra argument. If this argument is set to null then that method behaves exactly the same as the original method not having a TraceInfo
argument.
As such, when there's no trace information present then the correlation ID is taken from the enclosing ClientLogManager
. Otherwise, it's taken from the TraceInfo
object. Check the
documentation of that interface for details on how to obtain an object of that type.
Modifier and Type | Method and Description |
---|---|
java.util.EnumSet<ClientLogDestination> |
getLogDestinations()
Retrieves the set of destinations assigned to the given logger.
|
ClientLogLevel |
getLogLevel()
Retrieves the current log level assigned to the given logger.
|
boolean |
isDestinationSet(ClientLogDestination destination)
Tells whether a destination is set for the given logger or not.
|
void |
log(ClientLogLevel level,
java.lang.String message)
Generates a log with the given level.
|
void |
log(ClientLogLevel level,
java.lang.String message,
java.lang.Throwable tr)
Generates a log with the given level.
|
void |
log(ClientLogLevel level,
java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Generates a log with the given level.
|
void |
log(ClientLogLevel level,
java.lang.String message,
TraceInfo traceInfo)
Generates a log with the given level.
|
void |
logDebug(java.lang.String message)
Logs the message with level DEBUG.
|
void |
logDebug(java.lang.String message,
java.lang.Throwable tr)
Logs the message with level DEBUG.
|
void |
logDebug(java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Logs the message with level DEBUG.
|
void |
logDebug(java.lang.String message,
TraceInfo traceInfo)
Logs the message with level DEBUG.
|
void |
logError(java.lang.String message)
Logs the message with level ERROR.
|
void |
logError(java.lang.String message,
java.lang.Throwable tr)
Logs the message with level ERROR.
|
void |
logError(java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Logs the message with level ERROR.
|
void |
logError(java.lang.String message,
TraceInfo traceInfo)
Logs the message with level ERROR.
|
void |
logFatal(java.lang.String message)
Logs the message with level FATAL.
|
void |
logFatal(java.lang.String message,
java.lang.Throwable tr)
Logs the message with level FATAL.
|
void |
logFatal(java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Logs the message with level FATAL.
|
void |
logFatal(java.lang.String message,
TraceInfo traceInfo)
Logs the message with level FATAL.
|
void |
logInfo(java.lang.String message)
Logs the message with level INFO.
|
void |
logInfo(java.lang.String message,
java.lang.Throwable tr)
Logs the message with level INFO.
|
void |
logInfo(java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Logs the message with level INFO.
|
void |
logInfo(java.lang.String message,
TraceInfo traceInfo)
Logs the message with level INFO.
|
void |
logWarning(java.lang.String message)
Logs the message with level WARNING.
|
void |
logWarning(java.lang.String message,
java.lang.Throwable tr)
Logs the message with level WARNING.
|
void |
logWarning(java.lang.String message,
java.lang.Throwable tr,
TraceInfo traceInfo)
Logs the message with level WARNING.
|
void |
logWarning(java.lang.String message,
TraceInfo traceInfo)
Logs the message with level WARNING.
|
ClientLogLevel getLogLevel()
java.util.EnumSet<ClientLogDestination> getLogDestinations()
boolean isDestinationSet(ClientLogDestination destination)
destination
- the destination, can be nullvoid log(ClientLogLevel level, java.lang.String message)
level
- log levelmessage
- the log message, must be non-nullvoid logFatal(java.lang.String message)
message
- the log message, must be non-nullvoid logError(java.lang.String message)
message
- the log message, must be non-nullvoid logWarning(java.lang.String message)
message
- the log message, must be non-nullvoid logDebug(java.lang.String message)
message
- the log message, must be non-nullvoid logInfo(java.lang.String message)
message
- the log message, must be non-nullvoid log(ClientLogLevel level, java.lang.String message, java.lang.Throwable tr)
level
- log levelmessage
- the log message, must be non-nulltr
- exception to log, can be nullvoid logFatal(java.lang.String message, java.lang.Throwable tr)
message
- the log message, must be non-nulltr
- exception to log, can be nullvoid logError(java.lang.String message, java.lang.Throwable tr)
message
- the log message, must be non-nulltr
- exception to log, can be nullvoid logWarning(java.lang.String message, java.lang.Throwable tr)
message
- the log message, must be non-nulltr
- exception to log, can be nullvoid logDebug(java.lang.String message, java.lang.Throwable tr)
message
- the log message, must be non-nulltr
- exception to log, can be nullvoid logInfo(java.lang.String message, java.lang.Throwable tr)
message
- the log message, must be non-nulltr
- exception to log, can be nullvoid log(ClientLogLevel level, java.lang.String message, TraceInfo traceInfo)
level
- log leveltraceInfo
- the trace info object, can be nullmessage
- the log message, must be non-nullvoid logFatal(java.lang.String message, TraceInfo traceInfo)
message
- the log message, must be non-nulltraceInfo
- the trace info object, can be nullvoid logError(java.lang.String message, TraceInfo traceInfo)
message
- the log message, must be non-nulltraceInfo
- the trace info object, can be nullvoid logWarning(java.lang.String message, TraceInfo traceInfo)
message
- the log message, must be non-nulltraceInfo
- the trace info object, can be nullvoid logDebug(java.lang.String message, TraceInfo traceInfo)
message
- the log message, must be non-nulltraceInfo
- the trace info object, can be nullvoid logInfo(java.lang.String message, TraceInfo traceInfo)
message
- the log message, must be non-nulltraceInfo
- the trace info object, can be nullvoid log(ClientLogLevel level, java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
level
- log levelmessage
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be nullvoid logFatal(java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
message
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be nullvoid logError(java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
message
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be nullvoid logWarning(java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
message
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be nullvoid logDebug(java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
message
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be nullvoid logInfo(java.lang.String message, java.lang.Throwable tr, TraceInfo traceInfo)
message
- the log message, must be non-nulltr
- exception to log, can be nulltraceInfo
- the trace info object, can be null