feat: debug logging

Closes coop-cloud/organising#164.
This commit is contained in:
2021-09-11 00:54:02 +02:00
parent 27d665c3be
commit 9fcdc45851
38 changed files with 305 additions and 95 deletions

View File

@ -68,8 +68,18 @@ func RunApp(version, commit string) {
},
},
}
app.EnableBashCompletion = true
app.Before = func(c *cli.Context) error {
if Debug {
logrus.SetLevel(logrus.DebugLevel)
}
return nil
}
logrus.Debugf("Flying abra version '%s', commit '%s', enjoy the ride", version, commit)
if err := app.Run(os.Args); err != nil {
logrus.Fatal(err)
}