wsd: log the time when initializing the logger

Change-Id: I785c2a6a13dedbecf10a96a593f05e13980ea1e6
Reviewed-on: https://gerrit.libreoffice.org/32863
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian
2017-01-08 12:21:14 -05:00
committed by Ashod Nakashian
parent 93c66eeb9b
commit fe9e95dfa3

View File

@ -11,6 +11,7 @@
#include <atomic>
#include <cassert>
#include <ctime>
#include <iomanip>
#include <sstream>
#include <string>
@ -154,8 +155,13 @@ namespace Log
logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);
info("Initializing " + name);
info("Log level is [" + std::to_string(logger.getLevel()) + "].");
const std::time_t t = std::time(nullptr);
oss.str("");
oss.clear();
oss << "Initializing " << name << ". Local time: " << std::put_time(std::localtime(&t), "%c %Z")
<< ". UTC: " << std::put_time(std::gmtime(&t), "%c %Z")
<< ". Log level is [" << logger.getLevel() << "].";
info(oss.str());
}
Poco::Logger& logger()