log dicts instead of object representations

This commit is contained in:
Marco Zeisler
2021-06-02 22:35:16 +02:00
parent 7e3445f6ed
commit c6e23189de
4 changed files with 23 additions and 1 deletions
@@ -53,7 +53,11 @@ class EventLogger:
else:
key = 'UNKNOWN'
to_log = str(msg)
try:
to_log = json.dumps(msg.to_dict())
except AttributeError:
to_log = str(msg)
if self.log_to_redis:
self.redis.append(key, "{}<br>".format(to_log))
if self.verbose: