ConsoleEventSink.hpp

1. Overview

The ConsoleEventSink.hpp header declares a concrete IEventSink that renders RootGuard events as administrator-readable text on standard output.

The file integrates the following components, APIs, or runtime concepts:

  • IEventSink – event-consumer base class
  • rg_event – shared event structure

2. Public API

ConsoleEventSink is final and overrides onEvent(). The method is noexcept to respect the engine callback boundary.


3. Private Name Mapping

Two static helpers translate numeric event types and verdicts into stable textual names before formatting. Path-resolution naming is implemented privately in the corresponding source file.


4. Runtime and Security Considerations

  • Diagnostic sink: designed for service logs and interactive troubleshooting, not durable structured storage.
  • Exception containment: the implementation catches all formatting/output exceptions.