aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a9bf5c7e3..1765a47b1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -303,6 +303,11 @@ config_logger (struct config_file *cfg, gpointer ud)
{
struct rspamd_main *rm = ud;
+ if (config_test) {
+ /* Explicitly set logger type to console in case of config testing */
+ cfg->log_type = RSPAMD_LOG_CONSOLE;
+ }
+
rspamd_set_logger (cfg, g_quark_try_string ("main"), rm);
if (open_log_priv (rm->logger, rm->workers_uid, rm->workers_gid) == -1) {
fprintf (stderr, "Fatal error, cannot open logfile, exiting\n");