From 1625c22031b11240bb0c5148f5b59ee35b8378fc Mon Sep 17 00:00:00 2001
From: Mirko Waechter <mirko.waechter@kit.edu>
Date: Mon, 10 Sep 2018 15:50:02 +0200
Subject: [PATCH] Improved debug output message

---
 .../units/RobotUnit/NJointControllers/NJointController.cpp  | 6 +++---
 .../units/RobotUnit/NJointControllers/NJointController.h    | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
index 0e80baba0..45d8f734d 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.cpp
@@ -297,7 +297,7 @@ namespace armarx
         // make sure the destructor of the handles does not throw an exception and triggers a termination of the process
         try
         {
-            ARMARX_IMPORTANT << "Deleting thread handles";
+            ARMARX_DEBUG << "Deleting thread handles";
             ScopedLock lock(threadHandlesMutex);
             for (auto& pair : threadHandles)
             {
@@ -305,7 +305,7 @@ namespace armarx
                 auto& handle = pair.second;
                 if (!handle)
                 {
-                    ARMARX_INFO << "Thread Handle is NULL - skipping";
+                    ARMARX_VERBOSE << "Thread Handle is NULL - skipping";
                     continue;
                 }
                 std::future_status status;
@@ -318,7 +318,7 @@ namespace armarx
                     }
                     else if (status == std::future_status::ready || status == std::future_status::deferred)
                     {
-                        ARMARX_INFO << "Joining " << name << " task";
+                        ARMARX_VERBOSE << "Joining " << name << " task";
                         handle->join();
                         handle.reset();
                     }
diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
index 77049c09b..7abfb6981 100644
--- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
+++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h
@@ -696,6 +696,7 @@ namespace armarx
             ScopedLock lock(threadHandlesMutex);
             ARMARX_CHECK_EXPRESSION(!taskName.empty());
             ARMARX_CHECK_EXPRESSION(!threadHandles.count(taskName));
+            ARMARX_VERBOSE << "Adding NJointController task named '" << taskName << "' - current available thread count: " << getThreadPool()->getAvailableTaskCount();
             auto handlePtr = std::make_shared<ThreadPool::Handle>(getThreadPool()->runTask(task));
             ARMARX_CHECK_EXPRESSION_W_HINT(handlePtr->isValid(), "Could not add task (" << taskName << " - " << typeid(task).name() << " ) - available threads: " << getThreadPool()->getAvailableTaskCount());
             threadHandles[taskName] = handlePtr;
-- 
GitLab