]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/log-syslog.c
Logging: Let log_close_all() ASSERT that all references are gone.
[libucw.git] / ucw / log-syslog.c
index 50bb6efcc7a18be5a729418f45847c4d5a38c175..dae84005618899439df6310bbf0f923c8e071669 100644 (file)
@@ -18,7 +18,6 @@ struct syslog_stream {
   int facility;
 };
 
-/* Destructor */
 static void
 syslog_close(struct log_stream *ls)
 {
@@ -26,7 +25,7 @@ syslog_close(struct log_stream *ls)
     xfree(ls->name);
 }
 
-/* convert severity level to syslog constants */
+/* Convert severity level to syslog constants */
 static int
 syslog_level(int level)
 {
@@ -61,9 +60,6 @@ syslog_handler(struct log_stream *ls, struct log_msg *m)
   return 0;
 }
 
-/* assign log to a syslog facility */
-/* initialize with no formatting (syslog adds these inforamtion) */
-/* name is optional prefix (NULL for none) */
 struct log_stream *
 log_new_syslog(int facility, const char *name)
 {
@@ -71,9 +67,10 @@ log_new_syslog(int facility, const char *name)
   struct syslog_stream *ss = (struct syslog_stream *) ls;
   if (name)
     ls->name = xstrdup(name);
-  ls->msgfmt = LSFMT_NONE;
+  ls->msgfmt = 0;
   ls->handler = syslog_handler;
   ls->close = syslog_close;
   ss->facility = facility;
   return ls;
+  // FIXME: L_SIGHANDLER?
 }