Setup global log file before logging anything

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-06-14 08:47:36 +02:00
parent 658ef90458
commit 95cfbfb3fe
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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"))