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)
|