]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Conf] Make logging type and filename env-overridable
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 29 May 2026 07:36:12 +0000 (08:36 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 29 May 2026 07:36:12 +0000 (08:36 +0100)
commitccf7b96cf057b3a1cede61ce4f66916c3b3bbcbd
treeacde8912ea16f425a61bcb06dafe878f1bdd4f6f
parentf8e8e058ac4a1d76fccced595a429c259adb2a31
[Conf] Make logging type and filename env-overridable

Template the baseline logging block so deployments can switch logging
without patching conf/rspamd.conf:

    type = "{= env.LOG_TYPE|default('file') =}";
    filename = "{= env.LOG_FILE|default('$LOGDIR/rspamd.log') =}";

With no RSPAMD_LOG_TYPE/RSPAMD_LOG_FILE set the values render to the
previous hardcoded defaults (file, $LOGDIR/rspamd.log), so stock
installs are unchanged. A container can now set RSPAMD_LOG_TYPE=console
to log to stdout. Mirrors the env-template style introduced for the
worker bind_socket lines.
conf/rspamd.conf