From fa3c82f893a7249b0ac1cc146b806e7fbfd76d84 Mon Sep 17 00:00:00 2001 From: Steven Murray <Steven.Murray@cern.ch> Date: Wed, 2 May 2018 18:05:09 +0200 Subject: [PATCH] Logger timestamp is now the same as pre-production --- common/log/Logger.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/common/log/Logger.cpp b/common/log/Logger.cpp index b38a4127d6..27c1cd5439 100644 --- a/common/log/Logger.cpp +++ b/common/log/Logger.cpp @@ -197,16 +197,11 @@ std::string Logger::createMsgHeader( struct tm localTime; localtime_r(&(timeStamp.tv_sec), &localTime); - len += strftime(buf, bufLen, "%Y-%m-%dT%T", &localTime); - len += snprintf(buf + len, bufLen - len, ".%06ld", + len += strftime(buf, bufLen, "%b %e %T", &localTime); + len += snprintf(buf + len, bufLen - len, ".%06ld ", (unsigned long)timeStamp.tv_usec); - len += strftime(buf + len, bufLen - len, "%z: ", &localTime); - // dirty trick to have the proper timezone format (':' between hh and mm) - buf[len-2] = buf[len-3]; - buf[len-3] = buf[len-4]; - buf[len-4] = ':'; buf[sizeof(buf) - 1] = '\0'; - os << buf << programName << "[" << pid << "]: "; + os << buf << programName << ": "; return os.str(); } -- GitLab