Log

class Log(val maximumCapacity: Int = DEFAULT_CAPACITY)

Provides an event log. The maximumCapacity specifies the maximum number of elements this Log can contain, after which values are discarded as new ones are added, in a first in first out manner.

Constructors

Link copied to clipboard
constructor(maximumCapacity: Int = DEFAULT_CAPACITY)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val count: Int

Get the number of logged elements.

Link copied to clipboard

Functions

Link copied to clipboard
fun add(logElement: LogElement)

Add an element to the log.

Link copied to clipboard
fun clear()

Clear all elements from the log.

Link copied to clipboard

Get the contents of the log, as and array.

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