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
64e8b970
Commit
64e8b970
authored
Feb 07, 2010
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #7869: logging: improved format-time diagnostics and removed some 1.5.2 support code.
parent
b86d3fa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
17 deletions
+9
-17
Lib/logging/__init__.py
Lib/logging/__init__.py
+6
-12
Lib/logging/config.py
Lib/logging/config.py
+1
-5
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/__init__.py
View file @
64e8b970
...
...
@@ -769,7 +769,10 @@ class Handler(Filterer):
if
raiseExceptions
:
ei
=
sys
.
exc_info
()
try
:
traceback
.
print_exception
(
ei
[
0
],
ei
[
1
],
ei
[
2
],
None
,
sys
.
stderr
)
traceback
.
print_exception
(
ei
[
0
],
ei
[
1
],
ei
[
2
],
None
,
sys
.
stderr
)
sys
.
stderr
.
write
(
'Logged from file %s, line %s
\
n
'
%
(
record
.
filename
,
record
.
lineno
))
except
IOError
:
pass
# see issue 5971
finally
:
...
...
@@ -1572,17 +1575,8 @@ def shutdown(handlerList=_handlerList):
#else, swallow
#Let's try and shutdown automatically on application exit...
try
:
import
atexit
atexit
.
register
(
shutdown
)
except
ImportError
:
# for Python versions < 2.0
def
exithook
(
status
,
old_exit
=
sys
.
exit
):
try
:
shutdown
()
finally
:
old_exit
(
status
)
sys
.
exit
=
exithook
import
atexit
atexit
.
register
(
shutdown
)
# Null handler
...
...
Lib/logging/config.py
View file @
64e8b970
...
...
@@ -58,15 +58,11 @@ def fileConfig(fname, defaults=None, disable_existing_loggers=True):
the ability to select from various pre-canned configurations (if the
developer provides a mechanism to present the choices and load the chosen
configuration).
In versions of ConfigParser which have the readfp method [typically
shipped in 2.x versions of Python], you can pass in a file-like object
rather than a filename, in which case the file-like object will be read
using readfp.
"""
import
ConfigParser
cp
=
ConfigParser
.
ConfigParser
(
defaults
)
if
hasattr
(
cp
,
'readfp'
)
and
hasattr
(
fname
,
'readline'
):
if
hasattr
(
fname
,
'readline'
):
cp
.
readfp
(
fname
)
else
:
cp
.
read
(
fname
)
...
...
Misc/NEWS
View file @
64e8b970
...
...
@@ -75,6 +75,8 @@ Core and Builtins
Library
-------
- Issue #7869: logging: improved diagnostic for format-time errors.
- Issue #7868: logging: added loggerClass attribute to Manager.
- Issue #7851: logging: clarification on logging configuration files.
...
...
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