From 964db6739cf3458356683bbe3eebd42e961569c7 Mon Sep 17 00:00:00 2001 From: Gregor Noczinski Date: Wed, 11 Mar 2020 19:23:30 +0100 Subject: [PATCH] Fixed assignment of flags --- main/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/main.go b/main/main.go index 0c016bd..28635e5 100644 --- a/main/main.go +++ b/main/main.go @@ -19,7 +19,11 @@ func main() { lc := log.Configuration{} app.Flags = append(app.Flags, lc.Flags()...) + oldBefore := app.Before app.Before = func(context *cli.Context) error { + if err := oldBefore(context); err != nil { + return err + } if err := log.Default.SetConfiguration(lc); err != nil { return err }