log

abstract fun log(level: Level, cause: Throwable? = null, msg: () -> String)

Logs a message at the specified level.

Parameters

level

The severity level of the log message.

cause

An optional Throwable to log along with the message.

msg

A lambda returning the string message to log. It is only evaluated if the given level is enabled.