Skip to content

Commit

Permalink
Fixed assignment of flags
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Mar 11, 2020
1 parent 164f050 commit 964db67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 964db67

Please sign in to comment.