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

Sign up
Appearance settings

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)

AltStyle によって変換されたページ (->オリジナル) /