reduce default verbosity

This commit is contained in:
Manuel Barkhau 2018-12-22 00:31:59 +01:00
parent a92f09faf6
commit 39c95681f3
3 changed files with 7 additions and 5 deletions

View file

@ -527,7 +527,7 @@ different commits. This is mitigates a rare corner case where
```shell ```shell
$ pycalver show $ pycalver show --verbose
INFO - fetching tags from remote (to turn off use: -n / --no-fetch) INFO - fetching tags from remote (to turn off use: -n / --no-fetch)
Current Version: v201812.0005-beta Current Version: v201812.0005-beta
PEP440 Version : 201812.5b0 PEP440 Version : 201812.5b0
@ -547,6 +547,7 @@ To increment and publish a new version, you can use the
5. *Tag* the new commit. 5. *Tag* the new commit.
6. *Push* the new commit and tag. 6. *Push* the new commit and tag.
``` ```
$ pycalver bump --dry $ pycalver bump --dry
--- setup.cfg --- setup.cfg

View file

@ -47,7 +47,7 @@ def _init_logging(verbose: int = 0) -> None:
log_level = logging.DEBUG log_level = logging.DEBUG
elif verbose == 1: elif verbose == 1:
log_format = "%(levelname)-7s - %(message)s" log_format = "%(levelname)-7s - %(message)s"
log_level = logging.DEBUG log_level = logging.INFO
else: else:
log_format = "%(levelname)-7s - %(message)s" log_format = "%(levelname)-7s - %(message)s"
log_level = logging.INFO log_level = logging.INFO

View file

@ -62,9 +62,10 @@ class VCS:
def __call__(self, cmd_name: str, env=None, **kwargs: str) -> str: def __call__(self, cmd_name: str, env=None, **kwargs: str) -> str:
"""Invoke subcommand and return output.""" """Invoke subcommand and return output."""
cmd_str = self.subcommands[cmd_name] cmd_tmpl = self.subcommands[cmd_name]
cmd_parts = cmd_str.format(**kwargs).split() cmd_str = cmd_tmpl.format(**kwargs)
output_data = sp.check_output(cmd_parts, env=env, stderr=sp.STDOUT) log.debug(cmd_str)
output_data = sp.check_output(cmd_str.split(), env=env, stderr=sp.STDOUT)
# TODO (mb 2018-11-15): Detect encoding of output? # TODO (mb 2018-11-15): Detect encoding of output?
_encoding = "utf-8" _encoding = "utf-8"