namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging; /// /// Interface for recording operational events to the local SQLite event log. /// public interface ISiteEventLogger { /// /// Record an event asynchronously. The call enqueues the event onto a background /// writer and returns without blocking the caller on disk I/O. The returned /// completes once the event is durably persisted and faults if /// the write fails, so callers that await it observe success or failure. /// /// Category: script, alarm, deployment, connection, store_and_forward, instance_lifecycle /// Info, Warning, or Error /// Optional instance ID associated with the event /// Source identifier, e.g., "ScriptActor:MonitorSpeed" /// Human-readable event description /// /// Optional free-form detail text (stack traces, compilation errors, etc.). /// Stored verbatim — JSON is conventional but not validated or enforced. /// Task LogEventAsync( string eventType, string severity, string? instanceId, string source, string message, string? details = null); /// /// SiteEventLogging-018: total number of event writes that have failed /// (SQLite error, disk full, bounded-queue overflow drop, etc.) since this /// logger was created. Available for future Health Monitoring integration — /// promoted onto the interface so a Health consumer can read it without a /// concrete-type downcast. Not yet polled by Health Monitoring; the wiring /// is tracked separately. /// long FailedWriteCount { get; } }