[elbe-devel] [PATCH 07/32] Add logging to stdout for command buildchroot

dion at linutronix.de dion at linutronix.de
Fri Jun 14 22:13:21 CEST 2019


From: Olivier Dion <dion at linutronix.de>

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/commands/buildchroot.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/elbepack/commands/buildchroot.py b/elbepack/commands/buildchroot.py
index 5761f5e8..5d0624e1 100644
--- a/elbepack/commands/buildchroot.py
+++ b/elbepack/commands/buildchroot.py
@@ -10,12 +10,14 @@ from __future__ import print_function
 
 from optparse import OptionParser
 import sys
+import os
 
 from elbepack.shellhelper import CommandError
 from elbepack.elbeproject import ElbeProject
 from elbepack.elbexml import ValidationError
 from elbepack.db import ElbeDB
 from elbepack.cdroms import CDROM_SIZE
+from elbepack.log import log
 from sqlalchemy.exc import OperationalError
 
 
@@ -88,6 +90,11 @@ def run_command(argv):
               "use --build-bin to build binary CDROM")
 
     try:
+        if opt.output:
+            log.new(opt.output)
+        else:
+            log.stdout()
+
         project = ElbeProject(opt.target, args[0], opt.output, opt.name,
                               opt.buildtype, opt.skip_validation)
     except ValidationError as e:
-- 
2.11.0




More information about the elbe-devel mailing list