From 018676f3d73d7e7e1ad4172064e9fef86d9309b0 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Wed, 7 Apr 2021 13:29:56 +0200
Subject: [PATCH] Log devices under their correct name

---
 devices/PCC.py                 | 2 ++
 devices/SDP.py                 | 2 ++
 devices/src/hardware_device.py | 3 +--
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/devices/PCC.py b/devices/PCC.py
index 7893073c1..472ab404b 100644
--- a/devices/PCC.py
+++ b/devices/PCC.py
@@ -20,10 +20,12 @@ from tango.server import device_property
 from clients.opcua_connection import OPCUAConnection
 from src.attribute_wrapper import *
 from src.hardware_device import *
+from src.lofar_logging import device_logging_to_python
 
 
 __all__ = ["PCC", "main"]
 
+@device_logging_to_python({"device": "PCC"})
 class PCC(hardware_device):
 	"""
 
diff --git a/devices/SDP.py b/devices/SDP.py
index 2f54bed7b..ec53be8a7 100644
--- a/devices/SDP.py
+++ b/devices/SDP.py
@@ -19,10 +19,12 @@ from tango.server import device_property
 from clients.opcua_connection import OPCUAConnection
 from src.attribute_wrapper import *
 from src.hardware_device import *
+from src.lofar_logging import device_logging_to_python
 
 
 __all__ = ["SDP", "main"]
 
+@device_logging_to_python({"device": "SDP"})
 class SDP(hardware_device):
 	"""
 
diff --git a/devices/src/hardware_device.py b/devices/src/hardware_device.py
index 2f11b6731..01bc2f445 100644
--- a/devices/src/hardware_device.py
+++ b/devices/src/hardware_device.py
@@ -17,7 +17,7 @@ from tango import DevState, DebugIt
 # Additional import
 
 from src.attribute_wrapper import *
-from src.lofar_logging import device_logging_to_python, log_exceptions
+from src.lofar_logging import log_exceptions
 
 
 __all__ = ["hardware_device"]
@@ -25,7 +25,6 @@ __all__ = ["hardware_device"]
 from src.wrappers import only_in_states
 
 
-@device_logging_to_python({"device": "SDP"})
 class hardware_device(Device):
 	"""
 
-- 
GitLab