From 176fca55a604c39f80fb03ee895d9513fb909ee4 Mon Sep 17 00:00:00 2001 From: Kjell Hedstrom Date: Wed, 24 Jun 2015 14:32:31 -0600 Subject: [PATCH] Thanks to @Bob Flynn: Separated the microseconds counter with a space instead of a period. Also added explanation that the counter is from the initialization --- src/g2filesinkhelper.ipp | 3 ++- src/g2logmessage.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/g2filesinkhelper.ipp b/src/g2filesinkhelper.ipp index 3adfb88..f2749c8 100644 --- a/src/g2filesinkhelper.ipp +++ b/src/g2filesinkhelper.ipp @@ -80,7 +80,8 @@ namespace g2 { std::ostringstream ss_entry; // Day Month Date Time Year: is written as "%a %b %d %H:%M:%S %Y" and formatted output as : Wed Sep 19 08:28:16 2012 ss_entry << "\t\tg2log created log at: " << g2::localtime_formatted(g2::systemtime_now(), "%a %b %d %H:%M:%S %Y") << "\n"; - ss_entry << "\t\tLOG format: [YYYY/MM/DD hh:mm:ss.uuu* LEVEL FILE:LINE] message\n\n"; + ss_entry << "\t\tLOG format: [YYYY/MM/DD hh:mm:ss uuu* LEVEL FILE:LINE] message"; + ss_entry << "\t\t(uuu*: microsecond counter since initialization of log worker)\n\n"; return ss_entry.str(); } diff --git a/src/g2logmessage.cpp b/src/g2logmessage.cpp index 3098f5e..2428514 100644 --- a/src/g2logmessage.cpp +++ b/src/g2logmessage.cpp @@ -44,7 +44,7 @@ namespace g2 { // helper for setting the normal log details in an entry std::string LogDetailsToString(const LogMessage& msg) { std::string out; - out.append("\n" + msg.timestamp() + "." + msg.microseconds() + "\t" + out.append("\n" + msg.timestamp() + " " + msg.microseconds() + "\t" + msg.level() + " [" + msg.file() + " L: " + msg.line() + "]\t"); return out; }