mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-16 17:42:05 +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 <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()
|
||||
|
Reference in New Issue
Block a user