Skip to content

Commit

Permalink
Improve error checking
Browse files Browse the repository at this point in the history
Make sure the configured log level is valid.
  • Loading branch information
UlrichEckhardt committed Mar 28, 2024
1 parent 35ced55 commit a4e073a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/broker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,11 @@ func configureAPIStub(c *cli.Context) {
}

func initEventStore() (events.EventStore, error) {
loglevel, err := log15.LvlFromString(eventStoreLoglevel)
// setup log handler
loglevel, err := log15.LvlFromString(eventStoreLoglevel)
if err != nil {
return nil, err
}
handler := log15.LvlFilterHandler(loglevel, logger.GetHandler())

// setup logger for event store
Expand Down

0 comments on commit a4e073a

Please sign in to comment.