KlerkLog

interface KlerkLog

Functions

Link copied to clipboard
abstract fun add(entry: LogEntry)

Adds an entry to the Klerk log. Subscribers will be informed about the entry.

Link copied to clipboard
abstract fun addReads(models: List<Model<*>>, context: KlerkContext)
Link copied to clipboard
abstract fun entries(context: KlerkContext): List<LogEntry>
Link copied to clipboard
abstract fun subscribe(context: KlerkContext): SharedFlow<LogEntry>

Subscribes to log events. Note that events related to reading of data are excluded. If you need those events, use subscribeToReads.

Link copied to clipboard
abstract fun subscribeToReads(context: KlerkContext): SharedFlow<LogEntry>

Subscribes to read events. Note that you must handle the events efficiently as there can be a huge amount of read events in a system.