log

fun <Error class: unknown class>.log(level: LogLevel, sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs a message using the current LoggerProvider configured in this CoroutineContext.

Parameters

level

The level (or severity) of this event

sourceComponent

The name of the component that generated the event

ex

An optional exception which explains the message

content

A lambda which provides the content of the message. This content does not need to include any data from the exception (if any), which may be concatenated later based on probe behavior.


inline fun <T> <Error class: unknown class>.log(level: LogLevel, ex: Throwable? = null, noinline content: () -> String)

Logs a message using the current LoggerProvider configured in this CoroutineContext.

Parameters

T

The class to use for the name of the component that generated the event

level

The level (or severity) of this event

ex

An optional exception which explains the message

content

A lambda which provides the content of the message. This content does not need to include any data from the exception (if any), which may be concatenated later based on probe behavior.