diff --git a/griptape/configs/logging/json_formatter.py b/griptape/configs/logging/json_formatter.py index 2a9835cb0e..3477112a5e 100644 --- a/griptape/configs/logging/json_formatter.py +++ b/griptape/configs/logging/json_formatter.py @@ -13,5 +13,7 @@ def __attrs_pre_init__(self) -> None: super().__init__() def format(self, record: Any) -> str: - record.msg = json.dumps(record.msg, indent=self.indent) + if isinstance(record.msg, dict): + record.msg = json.dumps(record.msg, indent=self.indent) + return super().format(record)