disable --stats by default

This commit is contained in:
palto42 2020-01-18 14:38:59 +01:00
parent e27ba0d08a
commit e108526bab
2 changed files with 6 additions and 13 deletions

View File

@ -187,13 +187,7 @@ def create_archive(
+ (('--info',) if logger.getEffectiveLevel() == logging.INFO and not json else ())
+ (
('--stats',)
if not dry_run
and (
(logger.isEnabledFor(logging.INFO) and files)
or logger.isEnabledFor(logging.DEBUG)
or stats
)
and not json
if not dry_run and (logger.isEnabledFor(logging.DEBUG) or stats) and not json
else ()
)
+ (('--debug', '--show-rc') if logger.isEnabledFor(logging.DEBUG) and not json else ())
@ -217,7 +211,7 @@ def create_archive(
if json:
output_log_level = None
elif stats:
elif stats and logger.getEffectiveLevel() == logging.WARNING:
output_log_level = logging.WARNING
else:
output_log_level = logging.INFO

View File

@ -60,10 +60,7 @@ def prune_archives(
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())
+ (
('--stats',)
if not dry_run
and (logger.isEnabledFor(logging.INFO) and files)
or logger.getEffectiveLevel() == logging.DEBUG
or stats
if not dry_run and logger.getEffectiveLevel() == logging.DEBUG or stats
else ()
)
+ (('--info',) if logger.getEffectiveLevel() == logging.INFO else ())
@ -76,6 +73,8 @@ def prune_archives(
execute_command(
full_command,
output_log_level=logging.WARNING if stats else logging.INFO,
output_log_level=logging.WARNING
if (stats and logger.getEffectiveLevel() == logging.WARNING)
else logging.INFO,
error_on_warnings=False,
)