Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6aadabc

Browse filesBrowse files
[3.12] pythongh-114494: Change logging docstring to bool for exec_info (GH=114558) (pythonGH-114624)
(cherry picked from commit 07236f5) Co-authored-by: Tristan Pank <tristanpank@gmail.com>
1 parent 25b2159 commit 6aadabc
Copy full SHA for 6aadabc

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed

‎Lib/logging/__init__.py

Copy file name to clipboardExpand all lines: Lib/logging/__init__.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ def debug(self, msg, *args, **kwargs):
15211521
To pass exception information, use the keyword argument exc_info with
15221522
a true value, e.g.
15231523
1524-
logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
1524+
logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
15251525
"""
15261526
if self.isEnabledFor(DEBUG):
15271527
self._log(DEBUG, msg, args, **kwargs)
@@ -1533,7 +1533,7 @@ def info(self, msg, *args, **kwargs):
15331533
To pass exception information, use the keyword argument exc_info with
15341534
a true value, e.g.
15351535
1536-
logger.info("Houston, we have a %s", "notable problem", exc_info=1)
1536+
logger.info("Houston, we have a %s", "notable problem", exc_info=True)
15371537
"""
15381538
if self.isEnabledFor(INFO):
15391539
self._log(INFO, msg, args, **kwargs)
@@ -1545,7 +1545,7 @@ def warning(self, msg, *args, **kwargs):
15451545
To pass exception information, use the keyword argument exc_info with
15461546
a true value, e.g.
15471547
1548-
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=1)
1548+
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
15491549
"""
15501550
if self.isEnabledFor(WARNING):
15511551
self._log(WARNING, msg, args, **kwargs)
@@ -1562,7 +1562,7 @@ def error(self, msg, *args, **kwargs):
15621562
To pass exception information, use the keyword argument exc_info with
15631563
a true value, e.g.
15641564
1565-
logger.error("Houston, we have a %s", "major problem", exc_info=1)
1565+
logger.error("Houston, we have a %s", "major problem", exc_info=True)
15661566
"""
15671567
if self.isEnabledFor(ERROR):
15681568
self._log(ERROR, msg, args, **kwargs)
@@ -1580,7 +1580,7 @@ def critical(self, msg, *args, **kwargs):
15801580
To pass exception information, use the keyword argument exc_info with
15811581
a true value, e.g.
15821582
1583-
logger.critical("Houston, we have a %s", "major disaster", exc_info=1)
1583+
logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
15841584
"""
15851585
if self.isEnabledFor(CRITICAL):
15861586
self._log(CRITICAL, msg, args, **kwargs)
@@ -1598,7 +1598,7 @@ def log(self, level, msg, *args, **kwargs):
15981598
To pass exception information, use the keyword argument exc_info with
15991599
a true value, e.g.
16001600
1601-
logger.log(level, "We have a %s", "mysterious problem", exc_info=1)
1601+
logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
16021602
"""
16031603
if not isinstance(level, int):
16041604
if raiseExceptions:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.