Lines Matching refs:log_modules
28 static struct rspamd_log_modules *log_modules = NULL; variable
331 if (module_id != -1 && isset (log_modules->bitset, module_id)) { in rspamd_logger_need_log()
827 if (log_modules->bitset_allocated * NBBY > log_modules->bitset_len + 1) { in rspamd_logger_allocate_mod_bit()
828 log_modules->bitset_len ++; in rspamd_logger_allocate_mod_bit()
829 return log_modules->bitset_len - 1; in rspamd_logger_allocate_mod_bit()
833 log_modules->bitset_allocated *= 2; in rspamd_logger_allocate_mod_bit()
834 log_modules->bitset = g_realloc (log_modules->bitset, in rspamd_logger_allocate_mod_bit()
835 log_modules->bitset_allocated); in rspamd_logger_allocate_mod_bit()
843 if (log_modules) { in RSPAMD_DESTRUCTOR()
844 g_hash_table_unref (log_modules->modules); in RSPAMD_DESTRUCTOR()
845 g_free (log_modules->bitset); in RSPAMD_DESTRUCTOR()
846 g_free (log_modules); in RSPAMD_DESTRUCTOR()
859 if (log_modules == NULL) { in rspamd_logger_add_debug_module()
864 log_modules = g_malloc0 (sizeof (*log_modules)); in rspamd_logger_add_debug_module()
865 log_modules->modules = g_hash_table_new_full (rspamd_strcase_hash, in rspamd_logger_add_debug_module()
867 log_modules->bitset_allocated = 16; in rspamd_logger_add_debug_module()
868 log_modules->bitset_len = 0; in rspamd_logger_add_debug_module()
869 log_modules->bitset = g_malloc0 (log_modules->bitset_allocated); in rspamd_logger_add_debug_module()
872 if ((m = g_hash_table_lookup (log_modules->modules, mname)) == NULL) { in rspamd_logger_add_debug_module()
876 clrbit (log_modules->bitset, m->id); in rspamd_logger_add_debug_module()
877 g_hash_table_insert (log_modules->modules, m->mname, m); in rspamd_logger_add_debug_module()
891 memset (log_modules->bitset, 0, log_modules->bitset_allocated); in rspamd_logger_configure_modules()
904 if (isclr (log_modules->bitset, id)) { in rspamd_logger_configure_modules()
907 setbit (log_modules->bitset, id); in rspamd_logger_configure_modules()