Skip to content

Commit

Permalink
fix: router new logger panic (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladtenlive authored Jul 16, 2023
1 parent 3867ad5 commit 43d9a13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions message/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func NewRouter(config RouterConfig, logger watermill.LoggerAdapter) (*Router, er
return nil, errors.Wrap(err, "invalid config")
}

if logger == nil {
logger = watermill.NopLogger{}
}

return &Router{
config: config,

Expand Down

0 comments on commit 43d9a13

Please sign in to comment.