]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Console log: output timestamp (seconds since start) for resolver, too
authorAlexander Barton <alex@barton.de>
Tue, 11 Nov 2008 21:01:27 +0000 (22:01 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 11 Nov 2008 21:01:27 +0000 (22:01 +0100)
src/ngircd/log.c

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