]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/log-conf.c
Logging: Add a couple of comments.
[libucw.git] / ucw / log-conf.c
index 4e6c14366bc1b6819b4cc1c8089e03d131e83f72..5d54d7f35b44e1d009d8835e55bee594d02af92d 100644 (file)
@@ -18,6 +18,8 @@
 #include <syslog.h>
 #include <sys/time.h>
 
+/*** 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)
 {