[Python-checkins] distutils2: introducing a logger object and started to drop log module usage
tarek.ziade
python-checkins at python.org
Mon Oct 25 02:06:39 CEST 2010
tarek.ziade pushed 9d8d6db12488 to distutils2:
http://hg.python.org/distutils2/rev/9d8d6db12488
changeset: 786:9d8d6db12488
tag: tip
user: Tarek Ziade <tarek at ziade.org>
date: Mon Oct 25 02:06:31 2010 +0200
summary: introducing a logger object and started to drop log module usage
files: distutils2/__init__.py, distutils2/config.py
diff --git a/distutils2/__init__.py b/distutils2/__init__.py
--- a/distutils2/__init__.py
+++ b/distutils2/__init__.py
@@ -7,9 +7,12 @@
import distutils2.pypi.simple
import distutils2.tests.pypi_server
"""
-__all__ = ['__version__']
+from logging import getLogger
+
+__all__ = ['__version__', 'logger']
__version__ = "1.0a3"
+logger = getLogger('distutils2')
# when set to True, converts doctests by default too
diff --git a/distutils2/config.py b/distutils2/config.py
--- a/distutils2/config.py
+++ b/distutils2/config.py
@@ -6,7 +6,7 @@
import sys
from ConfigParser import RawConfigParser
-from distutils2 import log
+from distutils2 import logger
from distutils2.util import check_environ, resolve_name
@@ -66,7 +66,7 @@
if os.path.isfile(local_file):
files.append(local_file)
- log.debug("using config files: %s" % ', '.join(files))
+ logger.debug("using config files: %s" % ', '.join(files))
return files
def _convert_metadata(self, name, value):
@@ -182,11 +182,11 @@
if filenames is None:
filenames = self.find_config_files()
- log.debug("Distribution.parse_config_files():")
+ logger.debug("Distribution.parse_config_files():")
parser = RawConfigParser()
for filename in filenames:
- log.debug(" reading %s" % filename)
+ logger.debug(" reading %s" % filename)
parser.read(filename)
if os.path.split(filename)[-1] == 'setup.cfg':
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list