Skip to content

Commit

Permalink
fix: ungraceful shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjules committed Apr 11, 2022
1 parent 4716739 commit c06ace1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ func New(lc fx.Lifecycle, cfg *config.Config) (*Logger, error) {

lc.Append(fx.Hook{
OnStop: func(_ context.Context) error {
return logger.Sync()
logger.Sync() //nolint:errcheck,gosec // see:https://github.com/uber-go/zap/issues/328

return nil
},
})

Expand Down

0 comments on commit c06ace1

Please sign in to comment.