Skip to content
Snippets Groups Projects
Commit 1cc99173 authored by Jan David Mol's avatar Jan David Mol
Browse files

Migrated logging patches to code in devices/ dir after overhaul on master

parent 0caf7394
No related branches found
No related tags found
1 merge request!7Resolve #2021 "03 16 branched from master elk stack"
...@@ -17,6 +17,7 @@ from tango import DevState, DebugIt ...@@ -17,6 +17,7 @@ from tango import DevState, DebugIt
# Additional import # Additional import
from src.attribute_wrapper import * from src.attribute_wrapper import *
from src.lofar_logging import device_logging_to_python, log_exceptions
__all__ = ["hardware_device"] __all__ = ["hardware_device"]
...@@ -24,6 +25,7 @@ __all__ = ["hardware_device"] ...@@ -24,6 +25,7 @@ __all__ = ["hardware_device"]
from src.wrappers import only_in_states from src.wrappers import only_in_states
@device_logging_to_python({"device": "SDP"})
class hardware_device(Device): class hardware_device(Device):
""" """
...@@ -59,6 +61,7 @@ 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()} self.value_dict = {i: i.initial_value() for i in self.attr_list()}
@log_exceptions
def init_device(self): def init_device(self):
""" Instantiates the device in the OFF state. """ """ Instantiates the device in the OFF state. """
...@@ -162,6 +165,7 @@ class hardware_device(Device): ...@@ -162,6 +165,7 @@ class hardware_device(Device):
"""Method always executed before any TANGO command is executed.""" """Method always executed before any TANGO command is executed."""
pass pass
@log_exceptions
def delete_device(self): def delete_device(self):
"""Hook to delete resources allocated in init_device. """Hook to delete resources allocated in init_device.
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment