log

abstract fun log(level: LogLevel, throwable: Throwable? = null, attrs: AttrBuilder.() -> Unit = {}, message: () -> String)(source)

Logs a message with a specific level and metadata.

Parameters

level

The log level.

throwable

An optional exception.

attrs

A builder for adding structured attributes.

message

A lambda providing the log message.