Skip to content

Commit 6e24cff

Browse files
thatbudakguydpgeorge
authored andcommitted
logging: Allow logging.exception helper to handle tracebacks.
Although `Logger.exception` supports passing exception info with `exc_info`, when you use `logging.exception` keyword arguments are not forwarded to the root logger, which makes passing `exc_info` raise `TypeError`. Signed-off-by: Nick Budak <thatbudakguy@gmail.com>
1 parent 15a6233 commit 6e24cff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python-stdlib/logging/logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ def critical(msg, *args):
202202
getLogger().critical(msg, *args)
203203

204204

205-
def exception(msg, *args):
206-
getLogger().exception(msg, *args)
205+
def exception(msg, *args, exc_info=True):
206+
getLogger().exception(msg, *args, exc_info=exc_info)
207207

208208

209209
def shutdown():

python-stdlib/logging/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
metadata(version="0.6.1")
1+
metadata(version="0.6.2")
22

33
module("logging.py")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy