mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[3.12] gh-114494: Change logging docstring to bool for exec_info (GH=114558) (GH-114624)
(cherry picked from commit 07236f5b39
)
Co-authored-by: Tristan Pank <tristanpank@gmail.com>
This commit is contained in:
parent
25b21596fe
commit
6aadabcfe6
1 changed files with 6 additions and 6 deletions
|
@ -1521,7 +1521,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
|
logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if self.isEnabledFor(DEBUG):
|
if self.isEnabledFor(DEBUG):
|
||||||
self._log(DEBUG, msg, args, **kwargs)
|
self._log(DEBUG, msg, args, **kwargs)
|
||||||
|
@ -1533,7 +1533,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.info("Houston, we have a %s", "notable problem", exc_info=1)
|
logger.info("Houston, we have a %s", "notable problem", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if self.isEnabledFor(INFO):
|
if self.isEnabledFor(INFO):
|
||||||
self._log(INFO, msg, args, **kwargs)
|
self._log(INFO, msg, args, **kwargs)
|
||||||
|
@ -1545,7 +1545,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=1)
|
logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if self.isEnabledFor(WARNING):
|
if self.isEnabledFor(WARNING):
|
||||||
self._log(WARNING, msg, args, **kwargs)
|
self._log(WARNING, msg, args, **kwargs)
|
||||||
|
@ -1562,7 +1562,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.error("Houston, we have a %s", "major problem", exc_info=1)
|
logger.error("Houston, we have a %s", "major problem", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if self.isEnabledFor(ERROR):
|
if self.isEnabledFor(ERROR):
|
||||||
self._log(ERROR, msg, args, **kwargs)
|
self._log(ERROR, msg, args, **kwargs)
|
||||||
|
@ -1580,7 +1580,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.critical("Houston, we have a %s", "major disaster", exc_info=1)
|
logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if self.isEnabledFor(CRITICAL):
|
if self.isEnabledFor(CRITICAL):
|
||||||
self._log(CRITICAL, msg, args, **kwargs)
|
self._log(CRITICAL, msg, args, **kwargs)
|
||||||
|
@ -1598,7 +1598,7 @@ class Logger(Filterer):
|
||||||
To pass exception information, use the keyword argument exc_info with
|
To pass exception information, use the keyword argument exc_info with
|
||||||
a true value, e.g.
|
a true value, e.g.
|
||||||
|
|
||||||
logger.log(level, "We have a %s", "mysterious problem", exc_info=1)
|
logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
|
||||||
"""
|
"""
|
||||||
if not isinstance(level, int):
|
if not isinstance(level, int):
|
||||||
if raiseExceptions:
|
if raiseExceptions:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue