log dicts instead of object representations
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user