This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joy
Recipients joy
Date 2019-11-26.18:39:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574793583.29.0.769726111814.issue38921@roundup.psfhosted.org>
In-reply-to
Content
Seeing an issue with the logger fmt not setting correctly in the Handler class. Our code calls format many times which works for a while and then we receive the following errors:

[3206] 2019/11/26 12:42:31.011> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1725, in info
[3206] 2019/11/26 12:42:31.013> [ERROR] self.log(INFO, msg, *args, **kwargs)
[3206] 2019/11/26 12:42:31.014> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1763, in log
[3206] 2019/11/26 12:42:31.016> [ERROR] self.logger.log(level, msg, *args, **kwargs)
[3206] 2019/11/26 12:42:31.017> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1444, in log
[3206] 2019/11/26 12:42:31.018> [ERROR] self._log(level, msg, args, **kwargs)
[3206] 2019/11/26 12:42:31.019> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1514, in _log
[3206] 2019/11/26 12:42:31.021> [ERROR] self.handle(record)
[3206] 2019/11/26 12:42:31.022> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1524, in handle
[3206] 2019/11/26 12:42:31.024> [ERROR] self.callHandlers(record)
[3206] 2019/11/26 12:42:31.025> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
[3206] 2019/11/26 12:42:31.026> [ERROR] hdlr.handle(record)
[3206] 2019/11/26 12:42:31.027> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 894, in handle
[3206] 2019/11/26 12:42:31.029> [ERROR] self.emit(record)
[3206] 2019/11/26 12:42:31.029> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1127, in emit
[3206] 2019/11/26 12:42:31.031> [ERROR] StreamHandler.emit(self, record)
[3206] 2019/11/26 12:42:31.032> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 1025, in emit
[3206] 2019/11/26 12:42:31.033> [ERROR] msg = self.format(record)
[3206] 2019/11/26 12:42:31.035> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 869, in format
[3206] 2019/11/26 12:42:31.036> [ERROR] return fmt.format(record)
[3206] 2019/11/26 12:42:31.037> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 869, in format
[3206] 2019/11/26 12:42:31.039> [ERROR] return fmt.format(record)
[3206] 2019/11/26 12:42:31.040> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 869, in format
[3206] 2019/11/26 12:42:31.041> [ERROR] return fmt.format(record)
[3206] 2019/11/26 12:42:31.042> [ERROR]   [Previous line repeated 978 more times]
[3206] 2019/11/26 12:42:31.043> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 608, in format
[3206] 2019/11/26 12:42:31.045> [ERROR] record.message = record.getMessage()
[3206] 2019/11/26 12:42:31.046> [ERROR]   File "/usr/lib/python3.7/logging/__init__.py", line 367, in getMessage
[3206] 2019/11/26 12:42:31.048> [ERROR] msg = str(self.msg)
[3206] 2019/11/26 12:42:31.049> [ERROR] RecursionError
[3206] 2019/11/26 12:42:31.049> [ERROR] :
[3206] 2019/11/26 12:42:31.050> [ERROR] maximum recursion depth exceeded while calling a Python object


I believe after a while the fmt object is not being set correctly and ends up calling the Handler's format function again and again.
History
Date User Action Args
2019-11-26 18:39:43joysetrecipients: + joy
2019-11-26 18:39:43joysetmessageid: <1574793583.29.0.769726111814.issue38921@roundup.psfhosted.org>
2019-11-26 18:39:43joylinkissue38921 messages
2019-11-26 18:39:42joycreate