Skip to content

Commit

Permalink
Merge pull request #60 from printfcoder/master
Browse files Browse the repository at this point in the history
fix logger init
  • Loading branch information
printfcoder authored Dec 12, 2020
2 parents 3beb1db + 40ce2ab commit ed2f521
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ func (c *cmd) before(ctx *cli.Context) error {
serverOpts = append(serverOpts, server.Metadata(metadata))
}

// then logger
if err := (*c.opts.Logger).Init(); err != nil {
log.Fatalf("Error configuring logger: %v", err)
}

// todo we dont need to init so many times
if len(conf.Broker.Address) > 0 {
if err := (*c.opts.Broker).Init(broker.Addrs(strings.Split(conf.Broker.Address, ",")...)); err != nil {
Expand Down

0 comments on commit ed2f521

Please sign in to comment.