8000 gh-114494: Change logging docstring to bool for exec_info (GH=114558) · python/cpython@07236f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 07236f5

Browse files
authored
gh-114494: Change logging docstring to bool for exec_info (GH=114558)
1 parent df17b52 commit 07236f5

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
@@ -1493,7 +1493,7 @@ def debug(self, msg, *args, **kwargs):
14931493
To pass exception information, use the keyword argument exc_info with
14941494
a true value, e.g.
14951495
1496-
logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
1496+
logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
14971497
"""
14981498
if self.isEnabledFor(DEBUG):
14991499
self._log(DEBUG, msg, args, **kwargs)
@@ -1505,7 +1505,7 @@ def info(self, msg, *args, **kwargs):
15051505
To pass exception information, use the keyword argument exc_info with
15061506
a true value, e.g.
15071507
1508-
logger.info("Houston, we have a %s", "notable problem", exc_info=1)
1508+
logger.info("Houston, we have a %s", "notable problem", exc_info=True)
15091509
"""
15101510
if self.isEnabledFor(INFO):
15111511
self._log(INFO, msg, args, **kwargs)
@@ -1517,7 +1517,7 @@ def warning(self, msg, *args, **kwargs):
15171517
To pass exception information, use the keyword argument exc_info with
15181518
a true value, e.g.
15191519
1520-
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=1)
1520+
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
15211521
"""
15221522
if self.isEnabledFor(WARNING):
15231523
self._log(WARNING, msg, args, **kwargs)
@@ -1529,7 +1529,7 @@ def error(self, msg, *args, **kwargs):
15291529
To pass exception information, use the keyword argument exc_info with
15301530
a true value, e.g.
15311531
1532-
logger.error("Houston, we have a %s", "major problem", exc_info=1)
1532+
logger.error("Houston, we have a %s", "major problem", exc_info=True)
15331533
"""
15341534
if self.isEnabledFor(ERROR):
15351535
self._log(ERROR, msg, args, **kwargs)
@@ -1547,7 +1547,7 @@ def critical(self, msg, *args, **kwargs):
15471547
To pass exception information, use the keyword argument exc_info with
15481548
a true value, e.g.
15491549
1550-
logger.critical("Houston, we have a %s", "major disaster", exc_info=1)
1550+
logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
15511551
"""
15521552
if self.isEnabledFor(CRITICAL):
15531553
self._log(CRITICAL, msg, args, **kwargs)
@@ -1565,7 +1565,7 @@ def log(self, level, msg, *args, **kwargs):
15651565
To pass exception information, use the keyword argument exc_info with
15661566
a true value, e.g.
15671567
1568-
logger.log(level, "We have a %s", "mysterious problem", exc_info=1)
1568+
logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
15691569
"""
15701570
if not isinstance(level, int):
15711571
if raiseExceptions:

0 commit comments

Comments
 (0)
0