Printing valid DSC messages as INFO, errors as DEBUG.

This commit is contained in:
Marat Fayzullin 2024-03-14 20:51:19 -04:00
parent 9e8e55eb4f
commit 19a5360228
1 changed files with 5 additions and 2 deletions

View File

@ -31,7 +31,10 @@ class DscParser(TextParser):
out["frequency"] = self.frequency
if "src" in out:
out["color"] = self.colors.getColor(out["src"])
# Log received messages
logger.debug("{0}".format(out))
# Log received messages, showing errors in debug mode only
if "data" in out:
logger.debug("{0}".format(out))
else:
logger.info("{0}".format(out))
# Done
return out