📄️ Overview
Stalwart Mail Server provides detailed tracing and logging information to help users monitor and understand its behavior. The logging mechanisms can be configured to output to a file, standard output, or send tracing information to OpenTelemetry. It is possible to configure multiple loggers to output to different destinations, and the level of detail can be adjusted per logger. This makes it easier for users to diagnose issues and understand the inner workings of the software.
📄️ OpenTelemetry
OpenTelemetry is an open-source standard for distributed tracing of applications. It provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from applications.
📄️ Log file
Stalwart Mail Server provides the ability to log information to a text file that can be rotated at a specified interval. When the log method is selected, the following configuration options are available under the tracer. key:
📄️ Console
When the console method is used, all tracing and logging information will be printed to the standard error. This method can be useful when Stalwart Mail Server is run in a container environment like Docker. When the console method is selected, the following configuration options are available under the tracer. key:
📄️ Journal
Journal is the logging system provided by the systemd suite, specifically managed by the systemd-journald service. Unlike traditional logging methods in Linux which rely on plain-text log files (e.g., /var/log/syslog or /var/log/messages), the journal captures system and service messages in a binary format. This format ensures better indexing, querying, and verification capabilities.