From 0299e6a86f3f402d3367ee091071cec1c8ebe783 Mon Sep 17 00:00:00 2001 From: ldericher Date: Tue, 11 Aug 2020 12:08:03 +0200 Subject: [PATCH] logging improve --- src/kiwi-config.py | 2 ++ src/kiwi/subcommands/_utils.py | 8 ++++---- src/kiwi/subcommands/show.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kiwi-config.py b/src/kiwi-config.py index 737fe98..87789e7 100755 --- a/src/kiwi-config.py +++ b/src/kiwi-config.py @@ -31,6 +31,8 @@ def main(): logging.getLogger().addHandler(log_handler) set_verbosity(logging.getLogger(), log_handler, args.verbosity) + logging.debug(f"main CLI args: {args}") + kiwi.Runner().run(args.command) diff --git a/src/kiwi/subcommands/_utils.py b/src/kiwi/subcommands/_utils.py index 7b615d5..e0e4f77 100644 --- a/src/kiwi/subcommands/_utils.py +++ b/src/kiwi/subcommands/_utils.py @@ -55,20 +55,20 @@ class DockerCommand: if DockerCommand.__requires_root: self.__cmd = [config[get_exe_key("sudo")], *self.__cmd] - def __build_cmd(self, args): + def __build_cmd(self, args, **kwargs): cmd = [*self.__cmd, *args] - logging.debug(f"DockerProgram: {cmd}") + logging.debug(f"DockerProgram cmd{cmd}, kwargs{kwargs}") return cmd def run(self, args, **kwargs): return subprocess.run( - self.__build_cmd(args), + self.__build_cmd(args, **kwargs), **kwargs ) def run_less(self, args, **kwargs): process = subprocess.Popen( - self.__build_cmd(args), + self.__build_cmd(args, **kwargs), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, **kwargs ) diff --git a/src/kiwi/subcommands/show.py b/src/kiwi/subcommands/show.py index f15b220..6785485 100644 --- a/src/kiwi/subcommands/show.py +++ b/src/kiwi/subcommands/show.py @@ -7,7 +7,7 @@ class ShowCommand(SubCommand): def __init__(self): super().__init__( 'show', - description="show effective kiwi.yml" + description="Show effective kiwi.yml" ) def run(self):