InMemoryLog

class InMemoryLog(val halfMaxEntries: Int) : Log

An in-memory log, split into two parts, so that when the maximum entries are exceeded, the start and end of the log are preserved, and the middle is discarded.

halfMaxEntries is the size of start and end, so the maximum number of entries is halfMaxEntries * 2.

Constructors

Link copied to clipboard
constructor(halfMaxEntries: Int)

Properties

Link copied to clipboard
Link copied to clipboard
open override var level: Int
Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
open override fun add(level: Int, message: String)
Link copied to clipboard
fun clear()
Link copied to clipboard
operator fun get(index: Int): String

Middle entries are lost. So there may be a jump at halfMaxEntries and -halfMaxEntries when isFull == true. You should see a message in the log itself when log entries have been lost.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String