From: Alexander Barton Date: Mon, 10 Nov 2008 17:41:19 +0000 (+0100) Subject: Console log: output timestamp (seconds since start of daemon) X-Git-Tag: rel-13-rc1~19 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=027cf22267e18cc8dec8f4e729267f9dec2060c3;p=ngircd.git Console log: output timestamp (seconds since start of daemon) --- diff --git a/src/ngircd/log.c b/src/ngircd/log.c index 9c4daf55..fbe87f0e 100644 --- a/src/ngircd/log.c +++ b/src/ngircd/log.c @@ -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