# Namespace EchoHub.Server.Services.ServerLogs | EchoHub Documentation

# Namespace EchoHub.Server.Services.ServerLogs

### Classes

LogBacklogEntry

  A backlog entry read from the log file: one timestamped log line plus any continuation lines (exception stack traces) that followed it.

ServerLogsService

  Shared logic for the live log room: room identity, the role gate, and reading the backlog tail from the current rolling log file. The file stays the only persistence — log lines are never stored as messages.

ServerLogsSink

  Serilog sink feeding the live log room. Events are queued in a bounded drop-oldest buffer and consumed by ServerLogsStreamService; nothing is written to the database. Events emitted by the streaming pipeline itself (the stream service and SignalR transport internals) are dropped here so a broadcast that logs — e.g. a transport warning on a dead connection — can never enter a log → broadcast → log feedback loop.

ServerLogsStreamService

  Streams queued log events to the live log room as ephemeral messages: SignalR only (the IRC gateway never sees them) and no database rows. Ensures the room exists before streaming, recreating it on the fly if it was deleted.

  This class must never log from its streaming path — its namespace is excluded by ServerLogsSink as a second line of defense, but the primary rule is simply not to log per event, otherwise every streamed line would spawn another.