Skip to content

Commit ba8c825

Browse files
committed
Set the default logging level in the build system to WARNING
1 parent 80edc77 commit ba8c825

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

cpydist/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
logging.Formatter("%(levelname)s[%(name)s]: %(message)s")
9999
)
100100
LOGGER.addHandler(handler)
101-
LOGGER.setLevel(logging.INFO)
101+
LOGGER.setLevel(logging.WARNING)
102102

103103

104104
class BaseCommand(Command):
@@ -155,7 +155,7 @@ def finalize_options(self):
155155
"""Finalize the options."""
156156
if self.debug:
157157
self.log.setLevel(logging.DEBUG)
158-
log.set_threshold(2) # Set Distutils logging level to DEBUG
158+
log.set_threshold(1) # Set Distutils logging level to DEBUG
159159

160160
cmd_build_ext = self.distribution.get_command_obj("build_ext")
161161
cmd_build_ext.with_mysql_capi = self.with_mysql_capi

cpydist/bdist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _get_fullname():
9393
"bdist.{}".format(self.plat_name))
9494
if self.debug:
9595
self.log.setLevel(logging.DEBUG)
96-
log.set_threshold(2) # Set Distutils logging level to DEBUG
96+
log.set_threshold(1) # Set Distutils logging level to DEBUG
9797

9898
def _remove_sources(self):
9999
"""Remove Python source files from the build directory."""

cpydist/bdist_deb.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ def _make_dpkg(self):
318318
stderr=subprocess.PIPE,
319319
universal_newlines=True,
320320
env=env)
321-
stdout = proc.stdout.read()
322-
stderr = proc.stderr.read()
321+
stdout, stderr = proc.communicate()
323322
for line in stdout.split("\n"):
324323
if self.debug:
325324
self.log.info(line)

cpydist/bdist_solaris.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def finalize_options(self):
114114
self.set_undefined_options("bdist", ("dist_dir", "dist_dir"))
115115
if self.debug:
116116
self.log.setLevel(logging.DEBUG)
117-
log.set_threshold(2) # Set Distutils logging level to DEBUG
117+
log.set_threshold(1) # Set Distutils logging level to DEBUG
118118

119119
def _prepare_pkg_base(self, template_name, data_dir, root=""):
120120
"""Create and populate the src base directory."""

cpydist/sdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _get_fullname():
9999
sdist.finalize_options(self)
100100
if self.debug:
101101
self.log.setLevel(logging.DEBUG)
102-
log.set_threshold(2) # Set Distutils logging level to DEBUG
102+
log.set_threshold(1) # Set Distutils logging level to DEBUG
103103

104104
def make_release_tree(self, base_dir, files):
105105
"""Make the release tree."""
@@ -195,7 +195,7 @@ def finalize_options(self):
195195

196196
if self.debug:
197197
self.log.setLevel(logging.DEBUG)
198-
log.set_threshold(2) # Set Distutils logging level to DEBUG
198+
log.set_threshold(1) # Set Distutils logging level to DEBUG
199199

200200
def run(self):
201201
"""Run the command."""

0 commit comments

Comments
 (0)