LogEvent
classin packageklyn.logging
public final class LogEvent:
LogEvent

Immutable event produced by a Logger and consumed by a LogHandler.

Example
import klyn.logging
import klyn.time

event = LogEvent(Timestamp.now, LogLevel.INFO, "app", "Started")
assert event.message == "Started"
Properties
Modifier and Type Member Description
public readonly property exception
exception as Exception
Optional application exception.
public readonly property fields
fields as LogFields
Immutable structured fields.
public readonly property level
level as LogLevel
Event severity.
public readonly property logger
logger as String
Hierarchical logger name.
public readonly property message
message as String
Human-readable message.
public readonly property source
source as LogSource
Source location supplied by the compiler when available.
public readonly property spanId
spanId as String
Span identifier inherited from the active context.
public readonly property timestamp
timestamp as Timestamp
UTC instant at which the event was created.
public readonly property traceId
traceId as String
Trace identifier inherited from the active context.
Constructors
Modifier and Type Member Description
public LogEvent
LogEvent( timestamp as Timestamp, level as LogLevel, logger as String, message as String, fields as LogFields = null, exception as Exception = null, source as LogSource = null, traceId as String = "", spanId as String = "" ):
Creates an immutable event.