Skip to content

Commit

Permalink
fix(otelzap): add missing DebugwContext function
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Kłosowski committed Jul 6, 2022
1 parent c155edf commit ea2b33a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions otelzap/otelzap.go
Expand Up @@ -451,6 +451,15 @@ func (s *SugaredLogger) logArgs(
s.l.log(span, lvl, fmt.Sprintf(template, args...), attrs)
}

// Debugw logs a message with some additional context. The variadic key-value
// pairs are treated as they are in With.
func (s *SugaredLogger) DebugwContext(
ctx context.Context, msg string, keysAndValues ...interface{},
) {
keysAndValues = s.logKVs(ctx, zap.DebugLevel, msg, keysAndValues)
s.Debugw(msg, keysAndValues...)
}

// Infow logs a message with some additional context. The variadic key-value
// pairs are treated as they are in With.
func (s *SugaredLogger) InfowContext(
Expand Down

0 comments on commit ea2b33a

Please sign in to comment.