1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-30 17:06:40 +00:00

Log thread id

This commit is contained in:
elsid 2018-07-14 12:06:15 +03:00
parent f6a60790f8
commit b33a291a67
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -14,6 +14,7 @@
#include <mutex>
#include <sstream>
#include <string>
#include <thread>
class dtNavMesh;
@ -123,7 +124,7 @@ namespace DetourNavigator
if (!log.isEnabled())
return;
std::ostringstream stream;
stream << '[' << std::chrono::steady_clock::now() << "] ";
stream << '[' << std::chrono::steady_clock::now() << "] [" << std::this_thread::get_id() << "] ";
write(stream, std::forward<Ts>(values) ...);
log.write(stream.str());
}