From e9450c4c668587c69833b82db6272c3083795e5b Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 21 Feb 2009 20:14:42 +0100 Subject: [PATCH] Logging: Add a couple of comments. --- ucw/log-conf.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/ucw/log-conf.c b/ucw/log-conf.c index 4e6c1436..5d54d7f3 100644 --- a/ucw/log-conf.c +++ b/ucw/log-conf.c @@ -18,6 +18,8 @@ #include #include +/*** Configuration of streams ***/ + struct stream_config { cnode n; char *name; @@ -170,14 +172,7 @@ log_config_init(void) cf_declare_section("Logging", &log_config, 0); } -char * -log_check_configured(const char *name) -{ - if (stream_find(name)) - return NULL; - else - return cf_printf("Log stream `%s' not found", name); -} +/*** Type sets ***/ static uns log_type_mask(clist *l) @@ -203,6 +198,8 @@ log_type_mask(clist *l) return types; } +/*** Generating limiters ***/ + /* * When limiting is enabled, we let log_stream->filter point to this function * and log_stream->user_data point to an array of pointers to token bucket @@ -247,6 +244,17 @@ log_apply_limits(struct log_stream *ls, struct limit_config *lim) limits[i] = tbf; } +/*** Generating streams ***/ + +char * +log_check_configured(const char *name) +{ + if (stream_find(name)) + return NULL; + else + return cf_printf("Log stream `%s' not found", name); +} + static struct log_stream * do_new_configured(struct stream_config *c) { -- 2.39.2