Reads Sovite's own log lines back, for sovitectl trace and
sovitectl report.
It understands every format Sovite writes (see docs/logging.md):
2026-10-04 12:00:00.123 [info] queue_id=4Xb2Kq event=queue.message.enqueued queue.message.enqueued: recipients=2, sender=a@example.com, size=1024
{"time":"2026-10-04T12:00:00.123456Z","level":"info","msg":"queue.message.enqueued: ...","queue_id":"4Xb2Kq","event":"queue.message.enqueued"}
Oct 4 12:00:00 mx1 sovite[812]: queue_id=4Xb2Kq event=queue.message.enqueued queue.message.enqueued: ...and the same lines with a syslog or journald prefix. Each line becomes an entry with:
time- aNaiveDateTime, in the log's own time zone (the year of a classic syslog line is the current one), ornillevel-"info","warning", ...queue_id,session_id,remote_ip,event- the standard metadata, ornilfields- thekey=valuepairs of a telemetry event's message, as stringsline- the line as it was
Lines that are not Sovite log lines are skipped. Gzip-compressed files (as logrotate leaves them) are read too.
Summary
Functions
The log files in directory written with file_name (a [log] file_name pattern), oldest first, compressed copies included.
Parses one log line, or returns nil if it is not a Sovite line.
Streams the entries of the log files at paths (oldest first), or of
standard input for "-".
Types
Functions
The log files in directory written with file_name (a [log] file_name pattern), oldest first, compressed copies included.
Parses one log line, or returns nil if it is not a Sovite line.
@spec stream([Path.t()]) :: Enumerable.t(entry())
Streams the entries of the log files at paths (oldest first), or of
standard input for "-".