]> source.dussan.org Git - rspamd.git/commitdiff
Log to console in case of config test.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 5 Jan 2014 18:22:57 +0000 (18:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 5 Jan 2014 18:22:57 +0000 (18:22 +0000)
src/main.c

index a9bf5c7e3a68d74cddc27b56b41328cb26b33c4d..1765a47b1b2422c284cb9d90b7dd30bdcbda6bed 100644 (file)
@@ -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");