From bfe48b659baf0e5007e5fd6b7804881cb92e32fe Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 6 Jan 2021 19:18:40 +0000 Subject: [Fix] Fix logging for rspamadm --- test/rspamd_test_suite.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/rspamd_test_suite.c') diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c index 4525f8ebc..7d0136708 100644 --- a/test/rspamd_test_suite.c +++ b/test/rspamd_test_suite.c @@ -52,17 +52,18 @@ main (int argc, char **argv) } /* Setup logger */ - rspamd_main->logger = rspamd_log_open_emergency (rspamd_main->server_pool); /* Setup logger */ if (verbose || g_test_verbose ()) { - rspamd_log_set_log_level (rspamd_main->logger, G_LOG_LEVEL_DEBUG); - rspamd_log_set_log_flags (rspamd_main->logger, + rspamd_main->logger = rspamd_log_open_emergency (rspamd_main->server_pool, RSPAMD_LOG_FLAG_USEC|RSPAMD_LOG_FLAG_ENFORCED|RSPAMD_LOG_FLAG_RSPAMADM); + + rspamd_log_set_log_level (rspamd_main->logger, G_LOG_LEVEL_DEBUG); } else { + rspamd_main->logger = rspamd_log_open_emergency (rspamd_main->server_pool, + RSPAMD_LOG_FLAG_RSPAMADM); rspamd_log_set_log_level (rspamd_main->logger, G_LOG_LEVEL_MESSAGE); - rspamd_log_set_log_flags (rspamd_main->logger,RSPAMD_LOG_FLAG_RSPAMADM); } rspamd_lua_set_path ((lua_State *)cfg->lua_state, NULL, NULL); -- cgit v1.2.3