Issue 27935: logging level FATAL missing in _nameToLevel (original) (raw)

Created on 2016-09-02 06:32 by Ondřej Medek, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue27935.patch xiang.zhang,2016-09-02 08:30 review
Messages (5)
msg274204 - (view) Author: Ondřej Medek (Ondřej Medek) Date: 2016-09-02 06:32
logging.__init__._nameToLevel is missing 'FATAL' key: >>> logging.getLevelName('FATAL') 'Level FATAL' Expected same as: >>> logging.getLevelName('CRITICAL') 50
msg274209 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-09-02 08:30
Though FATAL is not mentioned in the doc, but I think it should be added to getLevelName, just like how WARN is handled now: >>> logging.getLevelName("WARN") 30
msg274303 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2016-09-03 15:59
As this is an (admittedly small) change in behaviour, I'll apply in 3.6.
msg274305 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-03 16:04
New changeset 85f9f8bf2ec8 by Vinay Sajip in branch 'default': Closes #27935: returned numeric value for 'FATAL' logging level. https://hg.python.org/cpython/rev/85f9f8bf2ec8
msg274318 - (view) Author: Ondřej Medek (Ondřej Medek) Date: 2016-09-03 18:12
Just a comment to the https://hg.python.org/cpython/rev/85f9f8bf2ec8 It's functionality is right. It's just a little bit weird, that two derived levels in _nameToLevel: 'FATAL' maps to FATAL, i.e. itself, while 'WARN' maps to the WARNING, i.e. to the main level from which is derived.
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72122
2016-09-03 18:12:28 Ondřej Medek set messages: +
2016-09-03 16:04:45 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved
2016-09-03 15:59:16 vinay.sajip set messages: + versions: + Python 3.6, - Python 3.5
2016-09-02 08:30:59 xiang.zhang set files: + issue27935.patchnosy: + xiang.zhangmessages: + keywords: + patch
2016-09-02 07:37:51 SilentGhost set nosy: + vinay.sajip
2016-09-02 06:32:22 Ondřej Medek create