Skip to content

Commit 9485566

Browse files
[3.11] gh-114494: Change logging docstring to bool for exec_info (GH-114558) (GH-116242)
(cherry picked from commit 07236f5) Co-authored-by: Tristan Pank <[email protected]>
1 parent 862775b commit 9485566

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/logging/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ def debug(self, msg, *args, **kwargs):
14711471
To pass exception information, use the keyword argument exc_info with
14721472
a true value, e.g.
14731473
1474-
logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
1474+
logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
14751475
"""
14761476
if self.isEnabledFor(DEBUG):
14771477
self._log(DEBUG, msg, args, **kwargs)
@@ -1483,7 +1483,7 @@ def info(self, msg, *args, **kwargs):
14831483
To pass exception information, use the keyword argument exc_info with
14841484
a true value, e.g.
14851485
1486-
logger.info("Houston, we have a %s", "interesting problem", exc_info=1)
1486+
logger.info("Houston, we have a %s", "interesting problem", exc_info=True)
14871487
"""
14881488
if self.isEnabledFor(INFO):
14891489
self._log(INFO, msg, args, **kwargs)
@@ -1495,7 +1495,7 @@ def warning(self, msg, *args, **kwargs):
14951495
To pass exception information, use the keyword argument exc_info with
14961496
a true value, e.g.
14971497
1498-
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=1)
1498+
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
14991499
"""
15001500
if self.isEnabledFor(WARNING):
15011501
self._log(WARNING, msg, args, **kwargs)
@@ -1512,7 +1512,7 @@ def error(self, msg, *args, **kwargs):
15121512
To pass exception information, use the keyword argument exc_info with
15131513
a true value, e.g.
15141514
1515-
logger.error("Houston, we have a %s", "major problem", exc_info=1)
1515+
logger.error("Houston, we have a %s", "major problem", exc_info=True)
15161516
"""
15171517
if self.isEnabledFor(ERROR):
15181518
self._log(ERROR, msg, args, **kwargs)
@@ -1530,7 +1530,7 @@ def critical(self, msg, *args, **kwargs):
15301530
To pass exception information, use the keyword argument exc_info with
15311531
a true value, e.g.
15321532
1533-
logger.critical("Houston, we have a %s", "major disaster", exc_info=1)
1533+
logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
15341534
"""
15351535
if self.isEnabledFor(CRITICAL):
15361536
self._log(CRITICAL, msg, args, **kwargs)
@@ -1548,7 +1548,7 @@ def log(self, level, msg, *args, **kwargs):
15481548
To pass exception information, use the keyword argument exc_info with
15491549
a true value, e.g.
15501550
1551-
logger.log(level, "We have a %s", "mysterious problem", exc_info=1)
1551+
logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
15521552
"""
15531553
if not isinstance(level, int):
15541554
if raiseExceptions:

0 commit comments

Comments
 (0)