]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
logging: update format of messages written to terminal
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 9 Apr 2014 08:34:14 +0000 (10:34 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 9 Apr 2014 10:08:59 +0000 (12:08 +0200)
Move the time stamp to start of the line and print full date in ISO 8601
format.

logging.c

index 5e5ae502302fe27fd58372cc502ccf27d5d609a4..077a60cfee03dd0243b57873ad23d78d8803ff6d 100644 (file)
--- 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