From 1cc991731e91ae7f329d5e990c45bb0db6641522 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Sun, 4 Apr 2021 23:01:54 +0200 Subject: [PATCH] Migrated logging patches to code in devices/ dir after overhaul on master --- devices/src/hardware_device.py | 4 ++++ {SDP/SDP => devices/src}/lofar_logging.py | 0 2 files changed, 4 insertions(+) rename {SDP/SDP => devices/src}/lofar_logging.py (100%) diff --git a/devices/src/hardware_device.py b/devices/src/hardware_device.py index 0b9d488fb..2e198b78f 100644 --- a/devices/src/hardware_device.py +++ b/devices/src/hardware_device.py @@ -17,6 +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 __all__ = ["hardware_device"] @@ -24,6 +25,7 @@ __all__ = ["hardware_device"] from src.wrappers import only_in_states +@device_logging_to_python({"device": "SDP"}) class hardware_device(Device): """ @@ -59,6 +61,7 @@ class hardware_device(Device): self.value_dict = {i: i.initial_value() for i in self.attr_list()} + @log_exceptions def init_device(self): """ Instantiates the device in the OFF state. """ @@ -162,6 +165,7 @@ class hardware_device(Device): """Method always executed before any TANGO command is executed.""" pass + @log_exceptions def delete_device(self): """Hook to delete resources allocated in init_device. diff --git a/SDP/SDP/lofar_logging.py b/devices/src/lofar_logging.py similarity index 100% rename from SDP/SDP/lofar_logging.py rename to devices/src/lofar_logging.py -- GitLab