summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-01 14:50:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-01 14:50:37 +0100
commitc6eaee24a6c69bc727728b3c2b4a03aeec20c59f (patch)
treec26ed12d9ad93933aa03fea827972fd94400ec60 /src
parentce054a80baae86f7abfa4f9bcabc909c6ec6ceb4 (diff)
downloadrspamd-c6eaee24a6c69bc727728b3c2b4a03aeec20c59f.tar.gz
rspamd-c6eaee24a6c69bc727728b3c2b4a03aeec20c59f.zip
Add logging default handlers.
Diffstat (limited to 'src')
-rw-r--r--src/cfg_rcl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/cfg_rcl.c b/src/cfg_rcl.c
index 89d0e54f6..3c337d48f 100644
--- a/src/cfg_rcl.c
+++ b/src/cfg_rcl.c
@@ -151,7 +151,7 @@ gboolean rspamd_rcl_logging_handler (struct config_file *cfg, rspamd_cl_object_t
}
}
- return TRUE;
+ return rspamd_rcl_section_parse_defaults (section, cfg, obj, cfg, err);
}
/**
@@ -214,10 +214,22 @@ rspamd_rcl_config_init (void)
new = g_slice_alloc0 (sizeof (struct rspamd_rcl_section));
/* TODO: add all known rspamd sections here */
+ /**
+ * Logging section
+ */
sub = rspamd_rcl_add_section (new, "logging", rspamd_rcl_logging_handler, RSPAMD_CL_OBJECT,
FALSE, TRUE);
+ /* Default handlers */
rspamd_rcl_add_default_handler (sub, "log_buffer", rspamd_rcl_parse_struct_integer,
G_STRUCT_OFFSET (struct config_file, log_buf_size), 0);
+ rspamd_rcl_add_default_handler (sub, "log_urls", rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct config_file, log_urls), 0);
+ rspamd_rcl_add_default_handler (sub, "debug_ip", rspamd_rcl_parse_struct_string,
+ G_STRUCT_OFFSET (struct config_file, debug_ip_map), 0);
+ rspamd_rcl_add_default_handler (sub, "debug_symbols", rspamd_rcl_parse_struct_string_list,
+ G_STRUCT_OFFSET (struct config_file, debug_symbols), 0);
+ rspamd_rcl_add_default_handler (sub, "log_color", rspamd_rcl_parse_struct_boolean,
+ G_STRUCT_OFFSET (struct config_file, log_color), 0);
return new;
}