Skip to content

Commit

Permalink
revert sugar changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Pastro committed Jun 22, 2022
1 parent 1aff262 commit e25b3df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sugar.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ func (s *SugaredLogger) log(lvl zapcore.Level, template string, fmtArgs []interf
}

msg := getMessage(template, fmtArgs)
s.base.Log(lvl, msg, s.sweetenFields(context)...)
if ce := s.base.Check(lvl, msg); ce != nil {
ce.Write(s.sweetenFields(context)...)
}
}

// logln message with Sprintln
Expand All @@ -289,7 +291,9 @@ func (s *SugaredLogger) logln(lvl zapcore.Level, template string, fmtArgs []inte
}

msg := getMessageln(fmtArgs)
s.base.Log(lvl, msg, s.sweetenFields(context)...)
if ce := s.base.Check(lvl, msg); ce != nil {
ce.Write(s.sweetenFields(context)...)
}
}

// getMessage format with Sprint, Sprintf, or neither.
Expand Down

0 comments on commit e25b3df

Please sign in to comment.