InMemoryLogBuffer

object InMemoryLogBuffer : LogWriter(source)

A bounded in-memory ring buffer of recent Kermit log lines. Desktop has no system logcat, so install this writer at startup (Logger.setLogWriters(platformLogWriter(), InMemoryLogBuffer)) to let the Debug screen view and export the app's own logs. Lines are formatted to loosely match Android's logcat -v time shape (L/tag: message) so the same viewer/filters work on both platforms.

ponytail: a plain synchronized ArrayDeque — trivially correct for log volumes; swap for a lock-free ring only if it ever shows up hot in a profile.

Functions

Link copied to clipboard
open fun isLoggable(tag: String, severity: Severity): Boolean
Link copied to clipboard
open override fun log(severity: Severity, message: String, tag: String, throwable: Throwable?)
Link copied to clipboard