Skip to main content

//clika-runtime/io.clika.runtime/ClikaRtLog

ClikaRtLog

[common]
object ClikaRtLog

The runtime's log lines through the host app's own logger. The runtime logs on its "ClikaRT" channel; setLevel sets that channel's threshold and setCallback routes every record at or above it to a LogCallback. The runtime's own console output continues beside the callback.

One callback is ever installed: a second setCallback replaces the first, and null clears it.

ClikaRt.load()
ClikaRtLog.setLevel(LogLevel.INFO)
ClikaRtLog.setCallback { level, line -> println("[clikart $level] $line") }

On Android, ClikaRtAndroid.bridgeLogs() installs the logcat sink.

Functions​

NameSummary
level[common]
fun level(): LogLevel
The channel's current threshold.
setCallback[common]
fun setCallback(callback: LogCallback?)
Route every record to callback; null clears the sink.
setLevel[common]
fun setLevel(level: LogLevel)
The channel threshold: records below level are dropped.