Revision: 1250
Author: g.rodola
Date: Fri Apr 4 13:10:40 2014 UTC
Log: fix issue 283: always use a single 'pyftpdlib' logger
http://code.google.com/p/pyftpdlib/source/detail?r=1250
Modified:
/trunk/HISTORY
/trunk/pyftpdlib/ioloop.py
/trunk/pyftpdlib/log.py
/trunk/pyftpdlib/servers.py
=======================================
--- /trunk/HISTORY Thu Feb 6 02:38:15 2014 UTC
+++ /trunk/HISTORY Fri Apr 4 13:10:40 2014 UTC
@@ -18,6 +18,7 @@
* #261: (FTPS) SSL shutdown does not properly work on Windows.
* #280: (Python 2) unable to complete directory listing with invalid UTF8
characters. (patch by
d...@devicenull.org)
+ * #283: always use a single 'pyftpdlib' logger.
Version: 1.3.0 - Date: 2013-11-07
=======================================
--- /trunk/pyftpdlib/ioloop.py Mon Dec 30 11:33:10 2013 UTC
+++ /trunk/pyftpdlib/ioloop.py Fri Apr 4 13:10:40 2014 UTC
@@ -320,7 +320,7 @@
"""
if not _IOLoop._started_once:
_IOLoop._started_once = True
- if not logging.getLogger().handlers:
+ if not logging.getLogger('pyftpdlib').handlers:
# If we get to this point it means the user hasn't
# configured logging. We want to log by default so
# we configure logging ourselves so that it will
=======================================
--- /trunk/pyftpdlib/log.py Mon Dec 30 11:33:10 2013 UTC
+++ /trunk/pyftpdlib/log.py Fri Apr 4 13:10:40 2014 UTC
@@ -153,6 +153,6 @@
def _config_logging():
channel = logging.StreamHandler()
channel.setFormatter(LogFormatter())
- logger = logging.getLogger()
+ logger = logging.getLogger('pyftpdlib')
logger.setLevel(LEVEL)
logger.addHandler(channel)
=======================================
--- /trunk/pyftpdlib/servers.py Sun Dec 8 21:40:25 2013 UTC
+++ /trunk/pyftpdlib/servers.py Fri Apr 4 13:10:40 2014 UTC
@@ -161,7 +161,7 @@
return self._map_len() <= self.max_cons
def _log_start(self):
- if not logging.getLogger().handlers:
+ if not logging.getLogger('pyftpdlib').handlers:
# If we get to this point it means the user hasn't
# configured logger. We want to log by default so
# we configure logging ourselves so that it will