Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
947f358a
Commit
947f358a
authored
Aug 04, 2012
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15541: Correct anomaly in logging.exception. Thanks to Ned Batchelder for the report.
parent
8ba844ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Lib/logging/__init__.py
Lib/logging/__init__.py
+6
-4
No files found.
Lib/logging/__init__.py
View file @
947f358a
...
...
@@ -1173,11 +1173,12 @@ class Logger(Filterer):
if
self
.
isEnabledFor
(
ERROR
):
self
.
_log
(
ERROR
,
msg
,
args
,
**
kwargs
)
def
exception
(
self
,
msg
,
*
args
):
def
exception
(
self
,
msg
,
*
args
,
**
kwargs
):
"""
Convenience method for logging an ERROR with exception information.
"""
self
.
error
(
msg
,
exc_info
=
1
,
*
args
)
kwargs
[
'exc_info'
]
=
1
self
.
error
(
msg
,
*
args
,
**
kwargs
)
def
critical
(
self
,
msg
,
*
args
,
**
kwargs
):
"""
...
...
@@ -1582,12 +1583,13 @@ def error(msg, *args, **kwargs):
basicConfig
()
root
.
error
(
msg
,
*
args
,
**
kwargs
)
def
exception
(
msg
,
*
args
):
def
exception
(
msg
,
*
args
,
**
kwargs
):
"""
Log a message with severity 'ERROR' on the root logger,
with exception information.
"""
error
(
msg
,
exc_info
=
1
,
*
args
)
kwargs
[
'exc_info'
]
=
1
error
(
msg
,
*
args
,
**
kwargs
)
def
warning
(
msg
,
*
args
,
**
kwargs
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment