|
24 | 24 | To use, simply 'import logging' and log away! |
25 | 25 | """ |
26 | 26 |
|
27 | | -import sys, logging, logging.handlers, socket, struct, os, traceback, re |
28 | | -import types, io |
| 27 | +import sys, logging, logging.handlers, socket, struct, traceback, re |
| 28 | +import io |
29 | 29 |
|
30 | 30 | try: |
31 | 31 | import _thread as thread |
@@ -98,9 +98,6 @@ def _resolve(name): |
98 | 98 | def _strip_spaces(alist): |
99 | 99 | return map(lambda x: x.strip(), alist) |
100 | 100 |
|
101 | | -def _encoded(s): |
102 | | - return s if isinstance(s, str) else s.encode('utf-8') |
103 | | - |
104 | 101 | def _create_formatters(cp): |
105 | 102 | """Create and return formatters""" |
106 | 103 | flist = cp["formatters"]["keys"] |
@@ -215,7 +212,7 @@ def _install_loggers(cp, handlers, disable_existing): |
215 | 212 | #avoid disabling child loggers of explicitly |
216 | 213 | #named loggers. With a sorted list it is easier |
217 | 214 | #to find the child loggers. |
218 | | - existing.sort(key=_encoded) |
| 215 | + existing.sort() |
219 | 216 | #We'll keep the list of existing loggers |
220 | 217 | #which are children of named loggers here... |
221 | 218 | child_loggers = [] |
@@ -588,7 +585,7 @@ def configure(self): |
588 | 585 | #avoid disabling child loggers of explicitly |
589 | 586 | #named loggers. With a sorted list it is easier |
590 | 587 | #to find the child loggers. |
591 | | - existing.sort(key=_encoded) |
| 588 | + existing.sort() |
592 | 589 | #We'll keep the list of existing loggers |
593 | 590 | #which are children of named loggers here... |
594 | 591 | child_loggers = [] |
@@ -804,7 +801,6 @@ def handle(self): |
804 | 801 | struct.pack(">L", n), followed by the config file. |
805 | 802 | Uses fileConfig() to do the grunt work. |
806 | 803 | """ |
807 | | - import tempfile |
808 | 804 | try: |
809 | 805 | conn = self.connection |
810 | 806 | chunk = conn.recv(4) |
|
0 commit comments