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

L2SS-769: Reduce log spam if large attributes are given a default value

parent c9918673
No related branches found
No related tags found
1 merge request!317Resolve L2SS-769 "Implement digital beam"
...@@ -278,7 +278,7 @@ class lofar_device(Device, metaclass=DeviceMeta): ...@@ -278,7 +278,7 @@ class lofar_device(Device, metaclass=DeviceMeta):
default_value = getattr(self, f"{name}_default") default_value = getattr(self, f"{name}_default")
# set the attribute to the configured default # set the attribute to the configured default
logger.debug(f"Setting attribute {name} to {default_value if len(default_value) < 100 else (default_value[:100] + '...')}") logger.debug(f"Setting attribute {name} to {default_value if len(str(default_value)) < 100 else (default_value[:100] + '...')}")
self.proxy.write_attribute(name, default_value) self.proxy.write_attribute(name, default_value)
except Exception as e: except Exception as e:
# log which attribute we're addressing # log which attribute we're addressing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment