//clika-runtime/io.clika.runtime/ClikaRtLog
ClikaRtLog
[jvm]
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. Needs ClikaRt.load first.
ClikaRt.load()
ClikaRtLog.setLevel(ClikaRtGen.LOG_LEVEL_INFO)
ClikaRtLog.setCallback { level, line -> println("[clikart $level] $line") }
On Android, ClikaRtAndroid.bridgeLogs() installs the logcat sink.
Functions
| Name | Summary |
|---|---|
| setCallback | [jvm] fun setCallback(callback: LogCallback?) Route every record to callback; null clears the sink. |
| setLevel | [jvm] fun setLevel(level: Int) The channel threshold: records below level (a ClikaRtGen.LOG_LEVEL_* value) are dropped. |