9cff87fe85
Remove project bookkeeping citations from shipped code comments across the solution: hyphenated task IDs (WP-14, StoreAndForward-025), milestone/task/ issue refs (M3, Task 4, Audit Log #23, #21), Bundle X task-bundle labels, and C/D/K/S/T phase labels. Comment text only — no code logic, string/log literals, or XML-doc structure changed. Genuine descriptions are preserved (only the citation is stripped), and technical lookalikes are retained (UTF-8, SHA-256, T00:00:00, M365, UTC-5, pre-C4/pre-C5 schema versions). Flagged by the new CommentChecker TaskReferenceInComment / TrackingReferenceInComment checks plus targeted grep passes; full solution builds clean, append-only guard tests pass.
41 lines
1.9 KiB
C#
41 lines
1.9 KiB
C#
namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging;
|
|
|
|
/// <summary>
|
|
/// Interface for recording operational events to the local SQLite event log.
|
|
/// </summary>
|
|
public interface ISiteEventLogger
|
|
{
|
|
/// <summary>
|
|
/// 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
|
|
/// <see cref="Task"/> completes once the event is durably persisted and faults if
|
|
/// the write fails, so callers that <c>await</c> it observe success or failure.
|
|
/// </summary>
|
|
/// <param name="eventType">Category: script, alarm, deployment, connection, store_and_forward, instance_lifecycle, notification</param>
|
|
/// <param name="severity">Info, Warning, or Error</param>
|
|
/// <param name="instanceId">Optional instance ID associated with the event</param>
|
|
/// <param name="source">Source identifier, e.g., "ScriptActor:MonitorSpeed"</param>
|
|
/// <param name="message">Human-readable event description</param>
|
|
/// <param name="details">
|
|
/// Optional free-form detail text (stack traces, compilation errors, etc.).
|
|
/// Stored verbatim — JSON is conventional but not validated or enforced.
|
|
/// </param>
|
|
/// <returns>A task that completes once the event is durably persisted.</returns>
|
|
Task LogEventAsync(
|
|
string eventType,
|
|
string severity,
|
|
string? instanceId,
|
|
string source,
|
|
string message,
|
|
string? details = null);
|
|
|
|
/// <summary>
|
|
/// Total number of event writes that have failed
|
|
/// (SQLite error, disk full, bounded-queue overflow drop, etc.) since this
|
|
/// logger was created. Polled by <c>SiteEventLogFailureCountReporter</c>
|
|
/// (Health Monitoring) every 30 s and surfaced on the site
|
|
/// health report as <c>SiteHealthReport.SiteEventLogWriteFailures</c>.
|
|
/// </summary>
|
|
long FailedWriteCount { get; }
|
|
}
|