diff options
Diffstat (limited to 'synapse/logging')
-rw-r--r-- | synapse/logging/_terse_json.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/logging/_terse_json.py b/synapse/logging/_terse_json.py index 6e82f7c7f1..b78d6e17c9 100644 --- a/synapse/logging/_terse_json.py +++ b/synapse/logging/_terse_json.py @@ -65,6 +65,12 @@ class JsonFormatter(logging.Formatter): if key not in _IGNORED_LOG_RECORD_ATTRIBUTES: event[key] = value + if record.exc_info: + exc_type, exc_value, _ = record.exc_info + if exc_type: + event["exc_type"] = f"{exc_type.__name__}" + event["exc_value"] = f"{exc_value}" + return _encoder.encode(event) |