diff OrthancServer/Sources/main.cpp @ 5450:9ffd6d18daf3 pg-transactions

log lines now contain the thread name
author Alain Mazy <am@osimis.io>
date Tue, 05 Dec 2023 16:26:35 +0100
parents 38403e13c1ca
children 176bc05f85f4 312e866e2550
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Wed Nov 29 09:28:21 2023 +0100
+++ b/OrthancServer/Sources/main.cpp	Tue Dec 05 16:26:35 2023 +0100
@@ -1780,6 +1780,7 @@
 int main(int argc, char* argv[]) 
 {
   Logging::Initialize();
+  Logging::SetCurrentThreadName("MAIN");
   SetGlobalVerbosity(Verbosity_Default);
 
   bool upgradeDatabase = false;
@@ -1834,6 +1835,10 @@
     {
       SetGlobalVerbosity(Verbosity_Verbose);
     }
+    else if (argument == "--logs-no-thread")
+    {
+      Logging::EnableThreadNames(false);
+    }
     else if (argument == "--trace")
     {
       SetGlobalVerbosity(Verbosity_Trace);