diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-01-05 18:22:57 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-01-05 18:22:57 +0000 |
commit | a0d4bb85ba1d1185317ba30868465b0cbc8e68b7 (patch) | |
tree | 67ab939590ddeb453b99639b1be34b1b553723c3 /src | |
parent | 59b100ac0e907fe976492d3596349c1f4fdc110e (diff) | |
download | rspamd-a0d4bb85ba1d1185317ba30868465b0cbc8e68b7.tar.gz rspamd-a0d4bb85ba1d1185317ba30868465b0cbc8e68b7.zip |
Log to console in case of config test.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 5 |
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"); |