Build process outputs each line twice

Don't propagate logs going to stdout to avoid duplicate messages

Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Change-Id: I52da42adc40aa5d468d1c0c1134e65689916a2a8
Closes-Bug: #1620239
This commit is contained in:
Vladislav Belogrudov 2016-09-05 13:29:50 +03:00 committed by Christian Berendt
parent ea747d7ce2
commit 80bdb458ee
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ def make_a_logger(conf=None, image_name=None):
if not log.handlers:
if conf is None or not conf.logs_dir or not image_name:
handler = logging.StreamHandler(sys.stdout)
log.propagate = False
else:
filename = os.path.join(conf.logs_dir, "%s.log" % image_name)
handler = logging.FileHandler(filename, delay=True)