Commit 9e1bc826 authored by Vinay Sajip's avatar Vinay Sajip

Closes #13356. Thanks to Florent Xicluna for the patch.

parent 51b2bf4f
...@@ -1007,6 +1007,8 @@ class Manager(object): ...@@ -1007,6 +1007,8 @@ class Manager(object):
placeholder to now point to the logger. placeholder to now point to the logger.
""" """
rv = None rv = None
if isinstance(name, unicode):
name = name.encode('utf-8')
_acquireLock() _acquireLock()
try: try:
if name in self.loggerDict: if name in self.loggerDict:
......
...@@ -211,7 +211,7 @@ def _install_loggers(cp, handlers, disable_existing_loggers): ...@@ -211,7 +211,7 @@ def _install_loggers(cp, handlers, disable_existing_loggers):
#avoid disabling child loggers of explicitly #avoid disabling child loggers of explicitly
#named loggers. With a sorted list it is easier #named loggers. With a sorted list it is easier
#to find the child loggers. #to find the child loggers.
existing.sort(key=_encoded) existing.sort()
#We'll keep the list of existing loggers #We'll keep the list of existing loggers
#which are children of named loggers here... #which are children of named loggers here...
child_loggers = [] child_loggers = []
...@@ -589,13 +589,14 @@ class DictConfigurator(BaseConfigurator): ...@@ -589,13 +589,14 @@ class DictConfigurator(BaseConfigurator):
#avoid disabling child loggers of explicitly #avoid disabling child loggers of explicitly
#named loggers. With a sorted list it is easier #named loggers. With a sorted list it is easier
#to find the child loggers. #to find the child loggers.
existing.sort(key=_encoded) existing.sort()
#We'll keep the list of existing loggers #We'll keep the list of existing loggers
#which are children of named loggers here... #which are children of named loggers here...
child_loggers = [] child_loggers = []
#now set up the new ones... #now set up the new ones...
loggers = config.get('loggers', EMPTY_DICT) loggers = config.get('loggers', EMPTY_DICT)
for name in loggers: for name in loggers:
name = _encoded(name)
if name in existing: if name in existing:
i = existing.index(name) i = existing.index(name)
prefixed = name + "." prefixed = name + "."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment