[elbe-devel] [PATCH v2 09/28] Add logging to stdout for command buildsysroot

dion at linutronix.de dion at linutronix.de
Fri Jun 21 19:40:01 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/commands/buildsysroot.py | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/elbepack/commands/buildsysroot.py b/elbepack/commands/buildsysroot.py
index 3dc8e38a..7c7fe9ab 100644
--- a/elbepack/commands/buildsysroot.py
+++ b/elbepack/commands/buildsysroot.py
@@ -12,6 +12,7 @@ import sys
 
 from elbepack.elbeproject import ElbeProject
 from elbepack.elbexml import ValidationError
+from elbepack.log import elbe_logging
 
 
 def run_command(argv):
@@ -30,12 +31,13 @@ def run_command(argv):
         oparser.print_help()
         sys.exit(20)
 
-    try:
-        project = ElbeProject(args[0], override_buildtype=opt.buildtype,
-                              skip_validate=opt.skip_validation)
-    except ValidationError as e:
-        print(str(e))
-        print("xml validation failed. Bailing out")
-        sys.exit(20)
+    with elbe_logging(stdout=True):
+        try:
+            project = ElbeProject(args[0], override_buildtype=opt.buildtype,
+                                  skip_validate=opt.skip_validation)
+        except ValidationError as e:
+            print(str(e))
+            print("xml validation failed. Bailing out")
+            sys.exit(20)
 
-    project.build_sysroot()
+        project.build_sysroot()
-- 
2.11.0




More information about the elbe-devel mailing list