Include phase name in log for some phases

Phases createiso, liveimages, image_build, ostree_installer and osbs are
done in parallel, logs from these phases are mixed and and it's not
obvious which log message belongs to which phase. This change adds phase
name in log message for these phases.

The new mixin 'PhaseLoggerMixin' is added to extend a Pungi phase with a
logging logger which copy handlers from compose's logger but with
formatter changed.

Fixes: #58
Signed-off-by: Qixiang Wan <qwan@redhat.com>
This commit is contained in:
Qixiang Wan 2016-11-18 14:33:03 -06:00
parent 9e52c68c82
commit 80fa723b1d
20 changed files with 134 additions and 91 deletions

View file

@ -181,7 +181,8 @@ def main():
from pungi.compose import Compose
logger = logging.Logger("Pungi")
logger = logging.getLogger("Pungi")
logger.setLevel(logging.DEBUG)
kobo.log.add_stderr_logger(logger)
conf = kobo.conf.PyConfigParser()