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
This commit is contained in:
Kjell Hedstrom 2015-06-24 14:32:31 -06:00
parent ab9a70e8a3
commit 176fca55a6
2 changed files with 3 additions and 2 deletions

View File

@ -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();
}

View File

@ -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;
}