MCPcopy
hub / github.com/go-kit/kit / With

Function With

log/log.go:24–26  ·  view source on GitHub ↗

With returns a new contextual logger with keyvals prepended to those passed to calls to Log. If logger is also a contextual logger created by With, WithPrefix, or WithSuffix, keyvals is appended to the existing context. The returned Logger replaces all value elements (odd indexes) containing a Valu

(logger Logger, keyvals ...interface{})

Source from the content-addressed store, hash-verified

22// The returned Logger replaces all value elements (odd indexes) containing a
23// Valuer with their generated value for each call to its Log method.
24func With(logger Logger, keyvals ...interface{}) Logger {
25 return log.With(logger, keyvals...)
26}
27
28// WithPrefix returns a new contextual logger with keyvals prepended to those
29// passed to calls to Log. If logger is also a contextual logger created by

Callers 4

Example_contextualFunction · 0.92
Example_valuerFunction · 0.92
Example_debugInfoFunction · 0.92
Example_filteredFunction · 0.92

Calls 1

WithMethod · 0.65

Tested by 4

Example_contextualFunction · 0.74
Example_valuerFunction · 0.74
Example_debugInfoFunction · 0.74
Example_filteredFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…