Skip to main content
Version: 0.16

Log file

Log-file output writes entries to a text file on disk. The file can be rotated at a fixed frequency so that long-running installations do not accumulate a single unbounded log.

Log-file output is represented by the Log variant of the Tracer object (found in the WebUI under Settings › Telemetry › Tracers). Alongside the common tracer fields (enable, level, lossy, events, eventsPolicy), the variant carries:

  • path: directory in which the log files are written. Required.
  • prefix: filename prefix for each log file. Default "stalwart".
  • rotate: rotation frequency. One of daily, hourly, minutely, or never. Default daily.
  • ansi: whether ANSI escape sequences are used to colour the output. Default true.
  • multiline: whether each entry spans multiple lines. Default false.

For example:

{
"@type": "Log",
"path": "/opt/stalwart/logs",
"prefix": "stalwart.log",
"rotate": "daily",
"ansi": true,
"multiline": false,
"enable": true,
"level": "info"
}