1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

More precise timings for logs (microsecond resolution)

This commit is contained in:
Ivan Savenko 2014-09-23 16:01:43 +03:00
parent 33c0e24940
commit bfd3aab78d
2 changed files with 3 additions and 3 deletions

View File

@ -208,7 +208,7 @@ CLogFormatter::CLogFormatter() : CLogFormatter("%m") { }
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));
}

View File

@ -188,7 +188,7 @@ private:
struct DLL_LINKAGE LogRecord
{
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()) { }
CLoggerDomain domain;