comparison OrthancFramework/Sources/JobsEngine/JobsEngine.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 0ea402b4d901
children 48b8dae6dc77
comparison
equal deleted inserted replaced
5449:29858f424fc7 5450:9ffd6d18daf3
120 120
121 void JobsEngine::Worker(JobsEngine* engine, 121 void JobsEngine::Worker(JobsEngine* engine,
122 size_t workerIndex) 122 size_t workerIndex)
123 { 123 {
124 assert(engine != NULL); 124 assert(engine != NULL);
125 125 Logging::SetCurrentThreadName(std::string("JOBS-WORKER-") + boost::lexical_cast<std::string>(workerIndex));
126 CLOG(INFO, JOBS) << "Worker thread " << workerIndex << " has started"; 126 CLOG(INFO, JOBS) << "Worker thread " << workerIndex << " has started";
127 127
128 while (engine->IsRunning()) 128 while (engine->IsRunning())
129 { 129 {
130 JobsRegistry::RunningJob running(engine->GetRegistry(), engine->threadSleep_); 130 JobsRegistry::RunningJob running(engine->GetRegistry(), engine->threadSleep_);