From f289b92bb8d94c9ba6e2941e9400f7a92a5b8e3f Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Mon, 2 May 2022 10:59:55 +0200 Subject: [PATCH] L2SS-769: Reduce log spam if large attributes are given a default value --- tangostationcontrol/tangostationcontrol/devices/lofar_device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/lofar_device.py b/tangostationcontrol/tangostationcontrol/devices/lofar_device.py index 6f0f1de56..03a1fff0b 100644 --- a/tangostationcontrol/tangostationcontrol/devices/lofar_device.py +++ b/tangostationcontrol/tangostationcontrol/devices/lofar_device.py @@ -278,7 +278,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}") + logger.debug(f"Setting attribute {name} to {default_value if len(default_value) < 100 else (default_value[:100] + '...')}") self.proxy.write_attribute(name, default_value) except Exception as e: # log which attribute we're addressing -- GitLab