SimpleEventLogger
class SimpleEventLogger(storage: Storage, partitionId: String = "default", expireAfter: Duration = 60.days, clock: Clock = Clock.System, onAddEvent: suspend (event: Event) -> Map<String, DataItem>? = { _ -> emptyMap() }, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)) : EventLogger
An implementation of EventLogger backed by a Storage implementation.
This implementation also provides an observable flow (eventFlow) that emits whenever the underlying event data is modified, making it easy for UI or other observers to react to changes.
Applications may use onAddEvent to determine if an event should be dropped or if additional application-specific data should be amended to the event. For example an application may have per-document setting on whether to log events or it may add a GPS-location for proximity presentment events.