]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Console log: output timestamp (seconds since start of daemon)
authorAlexander Barton <alex@barton.de>
Mon, 10 Nov 2008 17:41:19 +0000 (18:41 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 10 Nov 2008 17:41:19 +0000 (18:41 +0100)
src/ngircd/log.c

index 9c4daf557f8239bd0c6307aef02a23ad4ee0208d..fbe87f0ea2d8112267f7190375b1b8034f2b56f9 100644 (file)
@@ -248,11 +248,11 @@ va_dcl
        vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
        va_end( ap );
 
-       if( ! Is_Daemon )
-       {
-               /* auf Konsole ausgeben */
-               fprintf( stdout, "[%d:%d] %s\n", (int)getpid( ), Level, msg );
-               fflush( stdout );
+       if (!Is_Daemon) {
+               /* log to console */
+               fprintf(stdout, "[%d:%d %4ld] %s\n", (int)getpid( ), Level,
+                       time(NULL) - NGIRCd_Start, msg);
+               fflush(stdout);
        }
 #ifdef SYSLOG
        else