We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fmt
1 parent 0a6e1a4 commit d823c23Copy full SHA for d823c23
Lib/logging/config.py
@@ -667,10 +667,9 @@ def configure_formatter(self, config):
667
except TypeError as te:
668
if "'format'" not in str(te):
669
raise
670
- #Name of parameter changed from fmt to format.
671
- #Retry with old name.
672
- #This is so that code can be used with older Python versions
673
- #(e.g. by Django)
+ # logging.Formatter and its subclasses expect the `fmt`
+ # parameter instead of `format`. Retry passing configuration
+ # with `fmt`.
674
config['fmt'] = config.pop('format')
675
config['()'] = factory
676
result = self.configure_custom(config)
0 commit comments