LogEvent

data class LogEvent(val id: String = randomId(), val timestamp: Instant = timestampNow(), val host: String = hostname, val logger: String, val context: String? = threadContext(), val level: Level, val template: String? = null, val message: String, val stackTrace: String? = null, val items: EventItems = mapOf())

An event at a point in time with information about the running state of a program.

Constructors

Link copied to clipboard
constructor(id: String = randomId(), timestamp: Instant = timestampNow(), host: String = hostname, logger: String, context: String? = threadContext(), level: Level, template: String? = null, message: String, stackTrace: String? = null, items: EventItems = mapOf())

Functions

Link copied to clipboard

Properties

Link copied to clipboard

Name of the thread or similar context identifier where the event was emitted.

Link copied to clipboard

Host where the event occurred.

Link copied to clipboard
val id: String

Unique identifier for this event.

Link copied to clipboard

Map of items current at the time of the event, to be displayed as structured data.

Link copied to clipboard

Severity Level of the event.

Link copied to clipboard

Name of the logger that emitted the event.

Link copied to clipboard

Message describing the event.

Link copied to clipboard
val stackTrace: String? = null

String stack trace information that may be included if an error or exception is associated with the event.

Link copied to clipboard
val template: String? = null

Message template, if any, used to construct the message.

Link copied to clipboard
val timestamp: Instant

When the event occurred, to microsecond or better precision.