LogRecord

class LogRecord(val timestamp: Instant, val level: LogLevel, val tag: String, val message: String, val fields: Map<String, String> = emptyMap(), val error: Throwable? = null)(source)

One log event, as handed to every LogSink. Immutable, so sinks may keep it, forward it to another thread, or serialize it.

Constructors

Link copied to clipboard
constructor(timestamp: Instant, level: LogLevel, tag: String, message: String, fields: Map<String, String> = emptyMap(), error: Throwable? = null)

Properties

Link copied to clipboard
Link copied to clipboard

structured context, for example the peer, token or Message ID, already rendered as strings so that no mutable object escapes into a sink.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tag: String

dot-separated origin such as coap.exchange or oscore; see LogTags.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String