Module |
|
Header |
/Engine/Source/Developer/EditorAnalyticsSession/Public/EditorAnalyticsSession.h |
Include |
#include "EditorAnalyticsSession.h" |
Source |
/Engine/Source/Developer/EditorAnalyticsSession/Private/EditorAnalyticsSession.cpp |
void LogEvent
(
EEventType EventTpe,
const FDateTime & Timestamp
)
Append an event to the session log. The function is meant to record concurrent events, especially during a crash with minimum contention. The logger appends and persists the events of interest locklessly on spot as opposed to overriding existing values in the key-store. Appending is better because it prevent dealing with event ordering on the spot (no synchronization needed) and will preserve more information.
@note They key-store is not easily usable in a 'lockless' fashion. On Windows, the OS provides thread safe API to modify the registry (add/update). On Mac/Linux, the key-store is a simple file and without synchronization, concurrent writes will likely corrupt the file.