[elbe-devel] [PATCH 10/32] Add logging to stdout for command gen_update

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


From: Olivier Dion <dion at linutronix.de>

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

diff --git a/elbepack/commands/gen_update.py b/elbepack/commands/gen_update.py
index bc5e3bd2..0bac9856 100644
--- a/elbepack/commands/gen_update.py
+++ b/elbepack/commands/gen_update.py
@@ -10,11 +10,12 @@ from __future__ import print_function
 
 from optparse import OptionParser
 import sys
-import os.path
+import os
 
 from elbepack.elbeproject import ElbeProject
 from elbepack.elbexml import ValidationError
 from elbepack.updatepkg import gen_update_pkg, MissingData
+from elbepack.log import log
 
 
 def run_command(argv):
@@ -73,6 +74,7 @@ def run_command(argv):
         buildtype = None
 
     try:
+        log.stdout()
         project = ElbeProject(opt.target, name=opt.name,
                               override_buildtype=buildtype,
                               skip_validate=opt.skip_validation)
@@ -98,6 +100,7 @@ def run_command(argv):
         update_xml = args[0]
 
     try:
+        log.new(os.path.join(project.buildir, "log.txt"))
         gen_update_pkg(project, update_xml, opt.output, buildtype,
                        opt.skip_validation, opt.debug,
                        cfg_dir=opt.cfg_dir, cmd_dir=opt.cmd_dir)
-- 
2.11.0




More information about the elbe-devel mailing list