From 95cfbfb3febd6bd98077e9251138341b55a78d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 14 Jun 2016 08:47:36 +0200 Subject: [PATCH] Setup global log file before logging anything MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should fix the issue with only printing information about automatic toggling of `supported` flag to standard output and not to a file. Signed-off-by: Lubomír Sedlář --- bin/pungi-koji | 1 - pungi/compose.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pungi-koji b/bin/pungi-koji index 09726aed..80e5cc85 100755 --- a/bin/pungi-koji +++ b/bin/pungi-koji @@ -192,7 +192,6 @@ def main(): logger=logger, notifier=notifier) notifier.compose = compose - kobo.log.add_file_logger(logger, compose.paths.log.log_file("global", "pungi.log")) COMPOSE = compose try: run_compose(compose) diff --git a/pungi/compose.py b/pungi/compose.py index 23404c65..2c828c2d 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -112,6 +112,10 @@ class Compose(kobo.log.LoggingBase): # path definitions self.paths = Paths(self) + # Set up logging to file + if logger: + kobo.log.add_file_logger(logger, self.paths.log.log_file("global", "pungi.log")) + # to provide compose_id, compose_date and compose_respin self.ci_base = ComposeInfo() self.ci_base.load(os.path.join(self.paths.work.topdir(arch="global"), "composeinfo-base.json"))