From cbacebc9e740d69d7c0e5be76920cf6a5308efc1 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Wed, 24 Nov 2021 09:01:10 +0000
Subject: [PATCH] L2SS-493: Use logger instead of print in TestDeviceProxy

---
 .../tangostationcontrol/integration_test/device_proxy.py     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py b/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py
index b0085d964..25c92411e 100644
--- a/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py
+++ b/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py
@@ -1,7 +1,10 @@
+import logging
 import time
 
 from tango import DeviceProxy
 
+logger = logging.getLogger()
+
 
 class TestDeviceProxy(DeviceProxy):
 
@@ -16,7 +19,7 @@ class TestDeviceProxy(DeviceProxy):
             d.Off()
         except Exception as e:
             """Failing to turn Off devices should not raise errors here"""
-            print(f"Failed to turn device off in teardown {e}")
+            logger.error(f"Failed to turn device off in teardown {e}")
 
             """Wait for 1 second to prevent propagating reconnection errors"""
             time.sleep(1)
-- 
GitLab