New submission from Vinay Sajip <vinay_sa...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue33606> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com