diff --git a/watchtower/__init__.py b/watchtower/__init__.py index 4deee19..ae448d6 100644 --- a/watchtower/__init__.py +++ b/watchtower/__init__.py @@ -126,7 +126,7 @@ def __init__( def format(self, message): if self.add_log_record_attrs: - msg = message.msg if isinstance(message.msg, Mapping) else {"msg": message.msg} + msg = message.msg if isinstance(message.msg, Mapping) else {"msg": message.getMessage()} for field in self.add_log_record_attrs: if field != "msg": msg[field] = getattr(message, field) # type: ignore