Utility class for managing log entry persistence.
Features:
Used by LogPersistUtils for log entry persistence.
constructor();
PersistLogFactory: any
_logStorage: any
getLogStorage: any
readLogData: () => Promise<LogData>
Reads persisted log entries.
Called by LogPersistUtils.waitForInit() to restore state. Uses keys() from PersistBase to iterate over all stored entries. Returns empty array if no entries exist.
writeLogData: (logData: LogData) => Promise<void>
Writes log entries to disk with atomic file writes.
Called by LogPersistUtils after each log call to persist state. Uses entry.id as the storage key for individual file storage. Uses atomic writes to prevent corruption on crashes.
usePersistLogAdapter(Ctor: TPersistBaseCtor<string, ILogEntry>): void;
Registers a custom persistence adapter.
useJson(): void;
Switches to the default JSON persist adapter. All future persistence writes will use JSON storage.
useDummy(): void;
Switches to a dummy persist adapter that discards all writes. All future persistence writes will be no-ops.