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
9e1bc826
Commit
9e1bc826
authored
Nov 07, 2011
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #13356. Thanks to Florent Xicluna for the patch.
parent
51b2bf4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Lib/logging/__init__.py
Lib/logging/__init__.py
+2
-0
Lib/logging/config.py
Lib/logging/config.py
+3
-2
No files found.
Lib/logging/__init__.py
View file @
9e1bc826
...
...
@@ -1007,6 +1007,8 @@ class Manager(object):
placeholder to now point to the logger.
"""
rv
=
None
if
isinstance
(
name
,
unicode
):
name
=
name
.
encode
(
'utf-8'
)
_acquireLock
()
try
:
if
name
in
self
.
loggerDict
:
...
...
Lib/logging/config.py
View file @
9e1bc826
...
...
@@ -211,7 +211,7 @@ def _install_loggers(cp, handlers, disable_existing_loggers):
#avoid disabling child loggers of explicitly
#named loggers. With a sorted list it is easier
#to find the child loggers.
existing
.
sort
(
key
=
_encoded
)
existing
.
sort
()
#We'll keep the list of existing loggers
#which are children of named loggers here...
child_loggers
=
[]
...
...
@@ -589,13 +589,14 @@ class DictConfigurator(BaseConfigurator):
#avoid disabling child loggers of explicitly
#named loggers. With a sorted list it is easier
#to find the child loggers.
existing.sort(
key=_encoded
)
existing.sort()
#We'll keep the list of existing loggers
#which are children of named loggers here...
child_loggers = []
#now set up the new ones...
loggers = config.get('loggers', EMPTY_DICT)
for name in loggers:
name = _encoded(name)
if name in existing:
i = existing.index(name)
prefixed = 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