From e7bda85f7ce1bccb2ee95a99e087eb875ad03cd1 Mon Sep 17 00:00:00 2001 From: “Manuel Buil” Date: Mon, 13 Feb 2017 15:31:40 +0100 Subject: Extend the logging in the utils lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To learn about some of the bugs I saw, I added these lines to know what is going on. It was very useful to me and I thought that perhaps we can add it to the code to help in the future Change-Id: I070077749d2086489a536c9a7b7ecca4a05bb0a1 Signed-off-by: “Manuel Buil” --- sfc/lib/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sfc/lib/utils.py b/sfc/lib/utils.py index 186cbd91..02782765 100644 --- a/sfc/lib/utils.py +++ b/sfc/lib/utils.py @@ -34,6 +34,8 @@ def run_cmd(cmd): stderr=subprocess.PIPE) (output, errors) = pipe.communicate() + logger.debug("running [%s] returns: <%s> - %s " + "" % (cmd, pipe.returncode, output)) if output: output = output.strip() if pipe.returncode != 0 or len(errors) > 0: -- cgit 1.2.3-korg