log

open suspend fun log(level: Level, event: Any?)

Emit a log event, only if it passes the level check.

Parameters

level

severity level of the log event

event

a representation of the event, if any


open suspend fun log(level: Level, throwable: Throwable, event: Any?)

Emit a log event and associated throwable object, only if it passes the level check.

Parameters

level

severity level of the log event

throwable

a throwable object associated with this event

event

a representation of the event, if any


open suspend fun log(level: Level, throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object, only if it passes the level check.

Parameters

level

severity level of the log event

throwable

a throwable object associated with this event

values

values associated with holes in the message template


open suspend fun log(level: Level, template: String, vararg values: Any?)

Emit a log event from a message template, only if it passes the level check.

Parameters

level

severity level of the log event

values

values associated with holes in the message template


open suspend fun log(level: Level, throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object, only if it passes the level check.

Parameters

level

severity level of the log event

throwable

a throwable object associated with this event

event

lambda that returns a representation of the event


open suspend fun log(level: Level, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda, only if it passes the level check.

Parameters

level

severity level of the log event

event

lambda that returns a representation of the event


open suspend fun log(level: Level, message: String, items: EventItems)

Log an event with a message and an explicit set of items.

Parameters

level

level at which to log

message

message to include in the log event

items

items to include in the log event


open suspend fun log(level: Level, throwable: Throwable, message: String, items: EventItems)

Log an event with an associated throwable, a message and an explicit set of items.

Parameters

level

level at which to log

throwable

throwable object associated with this log event

message

message to include in the log event

items

items to include in the log event