From 41e359b71d8a8fc63e77c29dacdb2012627ec14e Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Tue, 25 Feb 2020 13:25:56 -0600 Subject: [PATCH] DAOS-4222 fix: Print full microseconds The CaRT logging facility currently only prints in hundredths of seconds, which leaves many log entries with the same timestamp. Microsecond granularity is available from the timespec, let's use it. Before: 02/25-12:44:08.58 hl-d102 DAOS[14202/14202] mem ... After: 02/25-13:03:06.610936 hl-d102 DAOS[24902/24902] mem Signed-off-by: Patrick Farrell --- src/gurt/dlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gurt/dlog.c b/src/gurt/dlog.c index 15d042b92..038eccd93 100644 --- a/src/gurt/dlog.c +++ b/src/gurt/dlog.c @@ -419,7 +419,7 @@ void d_vlog(int flags, const char *fmt, va_list ap) "%02d/%02d-%02d:%02d:%02d.%02ld %s ", tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - (long int) tv.tv_usec / 10000, mst.uts.nodename); + (long int) tv.tv_usec, mst.uts.nodename); if (mst.oflags & DLOG_FLV_TAG) { if (mst.oflags & DLOG_FLV_LOGPID) {