We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fb2a12 commit f496098Copy full SHA for f496098
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/custom_logging.py
@@ -79,10 +79,13 @@ def getMessage(self) -> str:
79
Returns:
80
str: Returns the message
81
"""
82
- msg = str(self.msg)
83
- if isinstance(self.args, dict):
84
- return msg.format(self.args)
85
- return msg % self.args if self.args else msg
+ msg = self.msg
+ if self.args:
+ if isinstance(self.args, dict):
+ msg = msg.format(**self.args)
86
+ else:
87
+ msg = msg.format(*self.args)
88
+ return msg
89
90
91
class CustomColorFormatter(logging.Formatter):
0 commit comments