Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
cr1cr1 committed Jan 30, 2024
1 parent 55a3cd0 commit 59646e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ func init() {

// logErrorw is a helper function to log error messages
func (s *Storage) logErrorw(msg string, keysAndValues ...interface{}) {
if s.cfg.UseLogger && s.cfg.Logger != nil {
if s.cfg.Logger != nil {
s.cfg.Logger.Errorw(msg, keysAndValues...)
}
}

// logInfow is a helper function to log error messages
func (s *Storage) logInfow(msg string, keysAndValues ...interface{}) {
if s.cfg.UseLogger && s.cfg.Logger != nil {
if s.cfg.Logger != nil {
s.cfg.Logger.Infow(msg, keysAndValues...)
}
}
Expand Down

0 comments on commit 59646e5

Please sign in to comment.