From 9a7972c27f5b7a7fad048ba41ea356d246d77268 Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Tue, 4 Aug 2020 13:09:23 +0200 Subject: [PATCH] Close logger and flush messages in update command --- cmds/portmaster-start/update.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmds/portmaster-start/update.go b/cmds/portmaster-start/update.go index af018e66..84fbb3d7 100644 --- a/cmds/portmaster-start/update.go +++ b/cmds/portmaster-start/update.go @@ -46,6 +46,8 @@ func downloadUpdates() error { "all/ui/modules/base.zip", ) + log.SetLogLevel(log.InfoLevel) + // logging is configured as a persistent pre-run method inherited from // the root command but since we don't use run.Run() we need to start // logging ourself. @@ -53,6 +55,7 @@ func downloadUpdates() error { if err != nil { fmt.Printf("failed to start logging: %s\n", err) } + defer log.Shutdown() return registry.DownloadUpdates(context.TODO()) }