diff --git a/tangostationcontrol/tangostationcontrol/devices/lofar_device.py b/tangostationcontrol/tangostationcontrol/devices/lofar_device.py index 9c85266d43e9fd56e34a46c0c873aceb9ca4d6d9..3fa662c0198b6f93b478a9fc09dbee6fd207e064 100644 --- a/tangostationcontrol/tangostationcontrol/devices/lofar_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/lofar_device.py @@ -17,6 +17,7 @@ from tango import AttrWriteType, DevState, DebugIt, Attribute, DeviceProxy, Attr import time import math import numpy +import textwrap # Additional import from tangostationcontrol.clients.attribute_wrapper import attribute_wrapper @@ -278,7 +279,7 @@ class lofar_device(Device, metaclass=DeviceMeta): default_value = getattr(self, f"{name}_default") # set the attribute to the configured default - logger.debug(f"Setting attribute {name} to {default_value if len(str(default_value)) < 100 else (default_value[:100] + '...')}") + logger.debug(textwrap.shorten(f"Setting attribute {name} to {default_value}", 150)) self.proxy.write_attribute(name, default_value) except Exception as e: # log which attribute we're addressing