Skip to content

Commit

Permalink
chore: improve logger configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 22, 2024
1 parent 4dc0bd5 commit 2436e18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ func New(cfg Config) *zap.Logger {
}

core := zapcore.NewTee(cores...)
zapOpts := make([]zap.Option, 0, 2) //nolint:mnd
zapOpts = append(zapOpts, zap.AddCaller())
zapOpts := []zap.Option{
zap.AddCaller(),
}

if cfg.Stacktrace {
zapOpts = append(zapOpts, zap.AddStacktrace(zap.ErrorLevel))
Expand Down

0 comments on commit 2436e18

Please sign in to comment.