Skip to content

Commit

Permalink
Disable log sampling in zap (#1460)
Browse files Browse the repository at this point in the history
Signed-off-by: psinghal20 <psinghal20@gmail.com>
  • Loading branch information
psinghal20 authored and yurishkuro committed Apr 4, 2019
1 parent 7da2260 commit 8b2a2c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/flags/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ func (s *Service) Start(v *viper.Viper) error {
}

sFlags := new(SharedFlags).InitFromViper(v)
if logger, err := sFlags.NewLogger(zap.NewProductionConfig()); err == nil {
newProdConfig := zap.NewProductionConfig()
newProdConfig.Sampling = nil
if logger, err := sFlags.NewLogger(newProdConfig); err == nil {
s.Logger = logger
} else {
return errors.Wrap(err, "Cannot create logger")
Expand Down

0 comments on commit 8b2a2c1

Please sign in to comment.