mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-20 16:39:17 +00:00
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:

committed by
Ashod Nakashian

parent
93c66eeb9b
commit
fe9e95dfa3
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <ctime>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -154,8 +155,13 @@ namespace Log
|
|||||||
|
|
||||||
logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);
|
logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);
|
||||||
|
|
||||||
info("Initializing " + name);
|
const std::time_t t = std::time(nullptr);
|
||||||
info("Log level is [" + std::to_string(logger.getLevel()) + "].");
|
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()
|
Poco::Logger& logger()
|
||||||
|
Reference in New Issue
Block a user