addEvent
Adds an event to the log.
This method generates a chronologically-sortable storage identifier and a current timestamp for the event, runs application-provided code to check if the event should be dropped or if app-specific data should be amended, and then finally saves the event.
Most code logging events will want to use addEventAsync since it runs in a separate coroutine and thus not slow down a time-sensitive code such as credential presentment where an external component is waiting for data to be returned.
Return
A copy of the Event with assigned id, timestamp, and appData. Returns null if the event was dropped.
Parameters
event
The Event to be recorded, note that Event.identifier, Event.timestamp, and Event.appData will be overwritten.