From: Miroslav Lichvar Date: Wed, 9 Apr 2014 08:34:14 +0000 (+0200) Subject: logging: update format of messages written to terminal X-Git-Tag: 1.30-pre1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c45b1d2a3922e60375aff549f6c2e8366b6db49;p=thirdparty%2Fchrony.git logging: update format of messages written to terminal Move the time stamp to start of the line and print full date in ISO 8601 format. --- diff --git a/logging.c b/logging.c index 5e5ae502..077a60cf 100644 --- a/logging.c +++ b/logging.c @@ -156,8 +156,8 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility, /* Don't clutter up syslog with internal debugging info */ time(&t); stm = *gmtime(&t); - strftime(buf, sizeof(buf), "%d-%H:%M:%S", &stm); - fprintf(stderr, "%s:%d:(%s)[%s] ", filename, line_number, function_name, buf); + strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", &stm); + fprintf(stderr, "%s %s:%d:(%s) ", buf, filename, line_number, function_name); } #endif