From a0fa993562b920411b0cb45773ea213a66ca9a54 Mon Sep 17 00:00:00 2001 From: d3fga8c <96765674+d3fga8c@users.noreply.github.com> Date: Sun, 14 Aug 2022 12:53:15 +0300 Subject: [PATCH] Update jsonformatter.py Fixing the invalid style formatting (when the style is not "%"). After this fix, it simply utilize the polymorphic record getMessage which handle relevant style. --- jsonformatter/jsonformatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonformatter/jsonformatter.py b/jsonformatter/jsonformatter.py index 4ee9038..a573723 100644 --- a/jsonformatter/jsonformatter.py +++ b/jsonformatter/jsonformatter.py @@ -321,7 +321,7 @@ def setRecordMessage(self, record): record.message = str(record.msg) if record.args: - record.message = str(record.message) % record.args + record.message = record.getMessage() if record.exc_info: # Cache the traceback text to avoid converting it multiple times