aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libutil/logger.c8
-rw-r--r--src/rspamd.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c
index 629ae8a12..0926b09de 100644
--- a/src/libutil/logger.c
+++ b/src/libutil/logger.c
@@ -1439,7 +1439,11 @@ rspamd_logger_configure_modules (GHashTable *mods_enabled)
while (g_hash_table_iter_next (&it, &k, &v)) {
id = rspamd_logger_add_debug_module ((const gchar *)k);
- msg_info ("enable debugging for module %s (%d)", (const gchar *)k, id);
- setbit (log_modules->bitset, id);
+
+ if (isclr (log_modules->bitset, id)) {
+ msg_info ("enable debugging for module %s (%d)", (const gchar *) k,
+ id);
+ setbit (log_modules->bitset, id);
+ }
}
} \ No newline at end of file
diff --git a/src/rspamd.c b/src/rspamd.c
index 3106ea0a9..a44f33b6c 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -265,6 +265,8 @@ config_logger (rspamd_mempool_t *pool, gpointer ud)
fprintf (stderr, "Fatal error, cannot open logfile, exiting\n");
exit (EXIT_FAILURE);
}
+
+ rspamd_logger_configure_modules (rspamd_main->cfg->debug_modules);
}
static void