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 2020-12-15 02:20 by ncoghlan.

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
2020-12-15 02:20:21ncoghlancreate