MDC
Mapped Diagnostic Context (MDC) for structured logging.
Provides thread-local and coroutine-context storage for contextual information that should be included with log messages.
Usage:
MDC.put("traceId", generateTraceId())
MDC.put("userId", user.id)
SoulLogger.info("Processing request")
// Output: {..., "context":{"traceId":"abc123","userId":"user456"}, ...}
MDC.clear()Content copied to clipboard
Author
LesterE
Since
1.0.0