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
45dedaaf
Commit
45dedaaf
authored
Jul 25, 2011
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #12637: Last resort messages now correctly handled. Thanks to Xavier de Gaye for the patch."
parent
59c01edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Lib/logging/__init__.py
Lib/logging/__init__.py
+3
-2
No files found.
Lib/logging/__init__.py
View file @
45dedaaf
...
...
@@ -18,7 +18,7 @@
Logging package for Python. Based on PEP 282 and comments thereto in
comp.lang.python, and influenced by Apache's log4j system.
Copyright (C) 2001-201
0
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-201
1
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
...
...
@@ -1440,7 +1440,8 @@ class Logger(Filterer):
c
=
c
.
parent
if
(
found
==
0
):
if
lastResort
:
lastResort
.
handle
(
record
)
if
record
.
levelno
>=
lastResort
.
level
:
lastResort
.
handle
(
record
)
elif
raiseExceptions
and
not
self
.
manager
.
emittedNoHandlerWarning
:
sys
.
stderr
.
write
(
"No handlers could be found for logger"
"
\
"
%s
\
"
\
n
"
%
self
.
name
)
...
...
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