From a8314990f286fff47b40ddde808a72b63f66a828 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 14 Jan 2021 02:31:28 -0800 Subject: [PATCH] Use log.debug for reserved space message. --- rarpar.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rarpar.py b/rarpar.py index b16ff69..2238e1e 100644 --- a/rarpar.py +++ b/rarpar.py @@ -10,9 +10,12 @@ import time from voussoirkit import betterhelp from voussoirkit import bytestring from voussoirkit import pathclass +from voussoirkit import vlogging from voussoirkit import winglob from voussoirkit import winwhich +log = vlogging.getLogger(__name__) + WINRAR = winwhich.which('winrar') PAR2 = winwhich.which('phpar2') @@ -150,7 +153,7 @@ def assert_enough_space(pathsize, workdir, moveto, rec, rev, par): f'Reserving {bytestring.bytestring(reserve)} /', f'{bytestring.bytestring(free_space)}.', ]) - print(message) + log.debug(message) if reserve > free_space: raise NotEnoughSpace('Please leave more space') @@ -499,6 +502,8 @@ def rarpar_argparse(args): ) def main(argv): + argv = vlogging.set_level_by_argv(log, argv) + parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('path')