]> mj.ucw.cz Git - libucw.git/blobdiff - lib/log.c
Including <stdarg.h> in lib/lib.h enables us to finally export vlog_msg()
[libucw.git] / lib / log.c
index 159383665988191ca6371e80c3c6bbbf20a69a84..381f7257830c453e32b5a28b83cffaae15fdc75b 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -20,7 +20,7 @@
 
 static char log_progname[32], *log_name_patt, *log_name;
 char *log_title;
-static pid_t log_pid;
+static int log_pid;
 static int log_params;
 static int log_name_size;
 static int log_switching;
@@ -58,8 +58,8 @@ log_switch(struct tm *tm)
   log_switching--;
 }
 
-static void
-vlog(unsigned int cat, const char *msg, va_list args)
+void
+vlog_msg(unsigned int cat, const char *msg, va_list args)
 {
   time_t tim = time(NULL);
   struct tm *tm = localtime(&tim);
@@ -112,7 +112,7 @@ log_msg(unsigned int cat, const char *msg, ...)
   va_list args;
 
   va_start(args, msg);
-  vlog(cat, msg, args);
+  vlog_msg(cat, msg, args);
   va_end(args);
 }
 
@@ -122,7 +122,7 @@ die(byte *msg, ...)
   va_list args;
 
   va_start(args, msg);
-  vlog(L_FATAL, msg, args);
+  vlog_msg(L_FATAL, msg, args);
   va_end(args);
 #ifdef DEBUG_DIE_BY_ABORT
   abort();