From a0d4bb85ba1d1185317ba30868465b0cbc8e68b7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 5 Jan 2014 18:22:57 +0000 Subject: [PATCH] Log to console in case of config test. --- src/main.c | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- 2.39.5