StructuredLog
object StructuredLog
MDC-style thread-local context manager for structured logging.
Values set via putLogContext are automatically included in all subsequent structured log entries on the same thread. Each thread maintains its own independent context, so this object is safe to use from multiple threads concurrently without synchronization.
StructuredLog.putLogContext("user_id", userId)
StructuredLog.putLogContext("session_id", sessionId)
// All logs below will include user_id and session_id.
StructuredTimber.d("Purchase completed", "item_id" to "SKU-123")Content copied to clipboard
Since
1.0.0