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.

classification
Title: logging: add high priority log level for warnings being cleared
Type: enhancement Stage: needs patch
Components: Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ncoghlan, vinay.sajip
Priority: low Keywords:

Created on 2020-12-15 02:20 by ncoghlan, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg383027 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2020-12-15 02:20
When using the logging module for long running services, there's one limitation of the predefined logging levels that I semi-regularly run into: the only entirely reliable log level for reporting that a WARNING state has been cleared is itself WARNING.

Using INFO instead means that it is common to get error logs that show warning states being entered without any matching "error cleared" notification.

My idea for resolving this would be to define a new ESSENTIAL log level between WARNING and ERROR. The idea of the new log level would be to have a logged-by-default level for non-fault-but-essential messages like:

* service startup (including version info)
* service shutdown
* warnings being cleared

(NOTICE would be another possible name for such a level)
History
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86808
2020-12-15 02:20:21ncoghlancreate