Log level 'error' should mean that something needs to be fixed

23 points by carlana


zesterer

My rule of thumb is usually:

Info: supplementary information should failure occur later

Warning: inefficient/non-standard operation, but primary functionality is retained

Error: A PICNIC issue, something about the environment the user chose the run the program is it broken and the system can't continue functioning as normal

Critical: A violation of the program's own logic invariants occurred (such as a tripped assert), indicating a bug in the system itself (in proprietary systems, this would be cause for a Return To Base)

IMO, programs without high availability requirements should always abort on critical since it's usually a sign of memory corruption or other akin-to-UB states.

Interested in comment on this, if anybody does things differently!