Skip to content

Commit

Permalink
core: Return default logger if no modules loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Apr 20, 2023
1 parent b301a3d commit c6ac350
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ func (ctx Context) Logger(module ...Module) *zap.Logger {
if len(module) > 0 {
mod = module[0]
}
if mod == nil {
return Log()
}
return ctx.cfg.Logging.Logger(mod)
}

Expand Down

0 comments on commit c6ac350

Please sign in to comment.