KtprdLog

object KtprdLog

Every log line ktprd emits goes through here.

This is deliberately separate from ktvine's sink rather than routed into it: the two CDMs are separate artifacts with separate log tags, and a caller using only one should not have to configure the other. The emit methods are public because ktprd-remote and ktprd-serve log through them from their own modules.

ktprd is quiet by default: only Severity.Warn and above reach the platform log.

Functions

Link copied to clipboard
fun d(message: () -> String)
Link copied to clipboard
fun e(throwable: Throwable? = null, message: () -> String)
Link copied to clipboard
fun reset()

Restore the default sink and severity.

Link copied to clipboard
fun setLogger(logger: Logger)

Route ktprd's logging into an existing Kermit Logger.

Link copied to clipboard
fun setMinSeverity(severity: Severity)

Raise or lower how much ktprd logs. Defaults to Severity.Warn.

Link copied to clipboard
fun v(message: () -> String)
Link copied to clipboard
fun w(message: () -> String)