mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
More precise timings for logs (microsecond resolution)
This commit is contained in:
parent
33c0e24940
commit
bfd3aab78d
@ -208,7 +208,7 @@ CLogFormatter::CLogFormatter() : CLogFormatter("%m") { }
|
|||||||
|
|
||||||
CLogFormatter::CLogFormatter(const std::string & pattern) : pattern(pattern)
|
CLogFormatter::CLogFormatter(const std::string & pattern) : pattern(pattern)
|
||||||
{
|
{
|
||||||
boost::posix_time::time_facet * facet = new boost::posix_time::time_facet("%H:%M:%S");
|
boost::posix_time::time_facet * facet = new boost::posix_time::time_facet("%H:%M:%S.%f");
|
||||||
dateStream.imbue(std::locale(dateStream.getloc(), facet));
|
dateStream.imbue(std::locale(dateStream.getloc(), facet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ private:
|
|||||||
struct DLL_LINKAGE LogRecord
|
struct DLL_LINKAGE LogRecord
|
||||||
{
|
{
|
||||||
LogRecord(const CLoggerDomain & domain, ELogLevel::ELogLevel level, const std::string & message)
|
LogRecord(const CLoggerDomain & domain, ELogLevel::ELogLevel level, const std::string & message)
|
||||||
: domain(domain), level(level), message(message), timeStamp(boost::posix_time::second_clock::local_time()),
|
: domain(domain), level(level), message(message), timeStamp(boost::posix_time::microsec_clock::local_time()),
|
||||||
threadId(boost::this_thread::get_id()) { }
|
threadId(boost::this_thread::get_id()) { }
|
||||||
|
|
||||||
CLoggerDomain domain;
|
CLoggerDomain domain;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user