Skip to content

Commit 25f38d7

Browse files
authored
bpo-40836: Add docstring to logging.fatal() and logging.Logger.fatal() (GH-20563)
Automerge-Triggered-By: @vsajip
1 parent 5fc4f8a commit 25f38d7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Lib/logging/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,11 @@ def critical(self, msg, *args, **kwargs):
14801480
if self.isEnabledFor(CRITICAL):
14811481
self._log(CRITICAL, msg, args, **kwargs)
14821482

1483-
fatal = critical
1483+
def fatal(self, msg, *args, **kwargs):
1484+
"""
1485+
Don't use this method, use critical() instead.
1486+
"""
1487+
self.critical(msg, *args, **kwargs)
14841488

14851489
def log(self, level, msg, *args, **kwargs):
14861490
"""
@@ -2039,7 +2043,11 @@ def critical(msg, *args, **kwargs):
20392043
basicConfig()
20402044
root.critical(msg, *args, **kwargs)
20412045

2042-
fatal = critical
2046+
def fatal(msg, *args, **kwargs):
2047+
"""
2048+
Don't use this function, use critical() instead.
2049+
"""
2050+
critical(msg, *args, **kwargs)
20432051

20442052
def error(msg, *args, **kwargs):
20452053
"""

0 commit comments

Comments
 (0)