Sovite.Core.LogReport (sovite v0.6.0)

Copy Markdown View Source

A summary of mail traffic from the logs, in the style of Postfix's pflogsumm, for sovitectl report.

It counts messages received, recipients delivered, deferred, and bounced, messages held, discarded, expired, and deleted, and commands rejected; bytes received and delivered; distinct senders and recipients. Then, at most :top lines each: traffic per hour (or per day, for more than one day), the domains delivered to with their delays, the senders and sender domains, and the most common deferral, bounce, and rejection reasons, warnings, and failed logins.

It reads the info level events (see Sovite.Core.Telemetry), so logs at warning and above give an incomplete report.

Options

  • :top - lines in each list. Defaults to 10.
  • :date - only count lines of this Date. Defaults to all.

Summary

Functions

Builds the report from log entries (see Sovite.Core.LogReader).

Formats a report from build/2 as text.

Functions

build(entries, opts \\ [])

Builds the report from log entries (see Sovite.Core.LogReader).

format(report)

@spec format(map()) :: String.t()

Formats a report from build/2 as text.