]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/log.c
- string.h wird nun includiert.
[ngircd-alex.git] / src / ngircd / log.c
index 7fb9ac150a7fca6322ad7dab4166a17f898b0805..6d10759253f4e70fc5064405ecb67986db839127 100644 (file)
@@ -9,11 +9,17 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: log.c,v 1.7 2001/12/25 22:04:26 alex Exp $
+ * $Id: log.c,v 1.9 2001/12/26 03:22:16 alex Exp $
  *
  * log.c: Logging-Funktionen
  *
  * $Log: log.c,v $
+ * Revision 1.9  2001/12/26 03:22:16  alex
+ * - string.h wird nun includiert.
+ *
+ * Revision 1.8  2001/12/25 23:13:00  alex
+ * - Versionsstring bei Programmstart verbessert.
+ *
  * Revision 1.7  2001/12/25 22:04:26  alex
  * - Aenderungen an den Debug- und Logging-Funktionen.
  *
@@ -47,6 +53,7 @@
 #include <assert.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <string.h>
 #include <syslog.h>
 
 #include <exp.h>
 
 GLOBAL VOID Log_Init( VOID )
 {
+       CHAR txt[64];
+
+       strcpy( txt, "" );
+
+#ifdef DEBUG
+       if( txt[0] ) strcat( txt, "+" );
+       else strcat( txt, "-" );
+       strcat( txt, "DEBUG" );
+#endif
+#ifdef SNIFFER
+       if( txt[0] ) strcat( txt, "+" );
+       else strcat( txt, "-" );
+       strcat( txt, "SNIFFER" );
+#endif
+
        openlog( PACKAGE, LOG_CONS|LOG_PID, LOG_LOCAL5 );
-       Log( LOG_NOTICE, PACKAGE" version "VERSION" started.");
+       Log( LOG_NOTICE, PACKAGE" version "VERSION"%s started.", txt );
 } /* Log_Init */