From: Serhiy Storchaka Date: Sat, 2 Mar 2024 13:40:17 +0000 (+0200) Subject: [3.11] gh-114494: Change logging docstring to bool for exec_info (GH-114558) (GH... X-Git-Tag: v3.11.9~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9485566096da274578b4ceb71c5f21639ba38b0e;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-114494: Change logging docstring to bool for exec_info (GH-114558) (GH-116242) (cherry picked from commit 07236f5b39a2e534cf190cd4f7c73300d209520b) Co-authored-by: Tristan Pank --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index f24421822242..1b93c2c3c06f 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1471,7 +1471,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with 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): self._log(DEBUG, msg, args, **kwargs) @@ -1483,7 +1483,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with a true value, e.g. - logger.info("Houston, we have a %s", "interesting problem", exc_info=1) + logger.info("Houston, we have a %s", "interesting problem", exc_info=True) """ if self.isEnabledFor(INFO): self._log(INFO, msg, args, **kwargs) @@ -1495,7 +1495,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with 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): self._log(WARNING, msg, args, **kwargs) @@ -1512,7 +1512,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with 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): self._log(ERROR, msg, args, **kwargs) @@ -1530,7 +1530,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with 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): self._log(CRITICAL, msg, args, **kwargs) @@ -1548,7 +1548,7 @@ class Logger(Filterer): To pass exception information, use the keyword argument exc_info with 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 raiseExceptions: