[New-bugs-announce] [issue33606] Improve logging performance when logger disabled

Vinay Sajip report at bugs.python.org
Tue May 22 15:15:59 EDT 2018


New submission from Vinay Sajip <vinay_sajip at yahoo.co.uk>:

If a logger is disabled (by setting it's disabled attribute to True), the check for this is done late in the dispatch of the logging event - during the handle() call - rather than isEnabledFor(), which would short-circuit some processing. So the check for logger.disabled should be moved to isEnabledFor().

Credit to Abhijit Gadgil for raising this:

https://stackoverflow.com/questions/50453121/logger-disabled-check-much-later-in-python-logging-module-whats-the-rationale

----------
assignee: vinay.sajip
components: Library (Lib)
messages: 317328
nosy: vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve logging performance when logger disabled
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33606>
_______________________________________


More information about the New-bugs-announce mailing list