addEvent

suspend fun addEvent(event: Event): Event

Adds a new event to the logger.

This method generates a chronologically-sortable storage identifier and a current timestamp for the event before saving it. If successful, it triggers an emission to eventFlow.

Return

A copy of the Event containing its assigned identifier and timestamp.

Parameters

event

The Event to be recorded.