aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-28 17:46:26 +0200
committerFlorian Dold <florian@dold.me>2021-08-28 17:46:38 +0200
commitb317b3e1114e93f5133429a64de82a4e865939f7 (patch)
tree5b87c843c3dec0a5f4056488e5097286ed3b76ca
parente74fadf931e7714c02210b210c0e35d43f88b859 (diff)
downloadgnunet-b317b3e1114e93f5133429a64de82a4e865939f7.tar.gz
gnunet-b317b3e1114e93f5133429a64de82a4e865939f7.zip
use ISO 8609 / RFC 3339 timestamps for logging
-rw-r--r--src/util/common_logging.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 48cc6fe3b..cba37cd2f 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -1014,8 +1014,10 @@ mylog (enum GNUNET_ErrorType kind,
1014 } 1014 }
1015 else 1015 else
1016 { 1016 {
1017 if (0 == strftime (date2, DATE_STR_SIZE, "%b %d %H:%M:%S-%%06u", tmptr)) 1017 /* RFC 3339 timestamp, with snprintf placeholder for microseconds */
1018 if (0 == strftime (date2, DATE_STR_SIZE, "%Y-%m-%dT%H:%M:%S.%%06u%z", tmptr))
1018 abort (); 1019 abort ();
1020 /* Fill in microseconds */
1019 if (0 > snprintf (date, sizeof(date), date2, timeofday.tv_usec)) 1021 if (0 > snprintf (date, sizeof(date), date2, timeofday.tv_usec))
1020 abort (); 1022 abort ();
1021 } 1023 }