NetworkLogStore

class NetworkLogStore(capacity: Int = DEFAULT_CAPACITY)

In-memory ring buffer of the most recent capacity exchanges, newest first.

Deliberately not persisted: log history that survives process death is a file full of request and response bodies sitting on disk, which is a liability rather than a feature. It is also why this needs no database and works identically on every target.

ponytail: record rebuilds the list each call. At the default 200 entries that is nothing; if a consumer ever logs at a rate where it matters, an ArrayDeque behind the StateFlow is the upgrade.

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val entries: StateFlow<List<NetworkLogEntry>>

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard