diff OrthancServer/Sources/LuaScripting.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 16cbfefa15e9
children 1474fd6ea6c6
line wrap: on
line diff
--- a/OrthancServer/Sources/LuaScripting.cpp	Wed Nov 29 09:28:21 2023 +0100
+++ b/OrthancServer/Sources/LuaScripting.cpp	Tue Dec 05 16:26:35 2023 +0100
@@ -776,6 +776,8 @@
 
   void LuaScripting::HeartBeatThread(LuaScripting* that)
   {
+    Logging::SetCurrentThreadName("LUA-HEARTBEAT");
+
     static const unsigned int GRANULARITY = 100;  // In milliseconds
     
     const boost::posix_time::time_duration PERIODICITY =
@@ -812,6 +814,8 @@
 
   void LuaScripting::EventThread(LuaScripting* that)
   {
+    Logging::SetCurrentThreadName("LUA-EVENTS");
+
     for (;;)
     {
       std::unique_ptr<IDynamicObject> event(that->pendingEvents_.Dequeue(100));