aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-14 12:33:53 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-14 13:42:48 +0000
commit2a9268f256233fc184a76083a284060391234214 (patch)
treec42c98c807b20a62ec562f9bb4e0769c270d0ece /src/rspamadm
parente415626203bec3746f7ce9d4d6681e3b938dd05d (diff)
downloadrspamd-2a9268f256233fc184a76083a284060391234214.tar.gz
rspamd-2a9268f256233fc184a76083a284060391234214.zip
[Rework] Change logger setup interface
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/configdump.c3
-rw-r--r--src/rspamadm/configtest.c3
-rw-r--r--src/rspamadm/rspamadm.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c
index 199a22693..355437b9c 100644
--- a/src/rspamadm/configdump.c
+++ b/src/rspamadm/configdump.c
@@ -86,7 +86,8 @@ config_logger (rspamd_mempool_t *pool, gpointer ud)
rm->cfg->log_type = RSPAMD_LOG_CONSOLE;
rm->cfg->log_level = G_LOG_LEVEL_CRITICAL;
- rspamd_set_logger (rm->cfg, g_quark_try_string ("main"), rm);
+ rspamd_set_logger (rm->cfg, g_quark_try_string ("main"), &rm->logger,
+ rm->server_pool);
if (rspamd_log_open_priv (rm->logger, rm->workers_uid, rm->workers_gid) ==
-1) {
fprintf (stderr, "Fatal error, cannot open logfile, exiting\n");
diff --git a/src/rspamadm/configtest.c b/src/rspamadm/configtest.c
index 967bca2ba..59f466de2 100644
--- a/src/rspamadm/configtest.c
+++ b/src/rspamadm/configtest.c
@@ -83,7 +83,8 @@ config_logger (rspamd_mempool_t *pool, gpointer ud)
rm->cfg->log_level = G_LOG_LEVEL_WARNING;
}
- rspamd_set_logger (rm->cfg, configtest_quark, rm);
+ rspamd_set_logger (rm->cfg, configtest_quark, &rm->logger,
+ rm->server_pool);
if (rspamd_log_open_priv (rm->logger, rm->workers_uid, rm->workers_gid) ==
-1) {
fprintf (stderr, "Fatal error, cannot open logfile, exiting\n");
diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c
index de1e53143..e242ab925 100644
--- a/src/rspamadm/rspamadm.c
+++ b/src/rspamadm/rspamadm.c
@@ -281,7 +281,8 @@ main (gint argc, gchar **argv, gchar **env)
cfg->log_level = G_LOG_LEVEL_WARNING;
cfg->log_type = RSPAMD_LOG_CONSOLE;
- rspamd_set_logger (cfg, process_quark, rspamd_main);
+ rspamd_set_logger (cfg, process_quark, &rspamd_main->logger,
+ rspamd_main->server_pool);
(void) rspamd_log_open (rspamd_main->logger);
g_log_set_default_handler (rspamd_glib_log_function, rspamd_main->logger);
g_set_printerr_handler (rspamd_glib_printerr_function);