From a7db41ebaa4921b2887bbd6e310f819433ba7cc7 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Sun, 21 Nov 2021 03:31:35 +0100 Subject: [PATCH] write thread ids to file --- src/Common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Common.cpp b/src/Common.cpp index 8f489fd..8a830cd 100644 --- a/src/Common.cpp +++ b/src/Common.cpp @@ -121,7 +121,8 @@ void RegisterThread(const std::string& str) { ThreadId = std::to_string(gettid()); #endif if (Application::Settings.DebugModeEnabled) { - std::cout << ("Thread \"" + str + "\" is TID " + ThreadId) << std::endl; + std::ofstream ThreadFile("Threads.log", std::ios::app); + ThreadFile << ("Thread \"" + str + "\" is TID " + ThreadId) << std::endl; } auto Lock = std::unique_lock(ThreadNameMapMutex); threadNameMap[std::this_thread::get_id()] = str;