From: Vsevolod Stakhov Date: Sun, 5 Jan 2014 18:22:57 +0000 (+0000) Subject: Log to console in case of config test. X-Git-Tag: 0.6.7~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a0d4bb85ba1d1185317ba30868465b0cbc8e68b7;p=rspamd.git Log to console in case of config test. --- 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");