MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / LogContextWith

Function LogContextWith

base/logging_context.go:325–327  ·  view source on GitHub ↗

LogContextWith is called to add custom context to the go context. All custom contexts should implement ContextAdder interface

(parent context.Context, adder ContextAdder)

Source from the content-addressed store, hash-verified

323// LogContextWith is called to add custom context to the go context.
324// All custom contexts should implement ContextAdder interface
325func LogContextWith(parent context.Context, adder ContextAdder) context.Context {
326 return context.WithValue(parent, adder.getContextKey(), adder)
327}
328
329// ServerLogContext stores server context data for logging
330type ServerLogContext struct {

Callers 15

AddServerLogContextMethod · 0.92
SetContextLogIDMethod · 0.92
NewCfgSGFunction · 0.85
TestCtxFunction · 0.85
BucketNameCtxFunction · 0.85
CollectionLogCtxFunction · 0.85
CorrelationIDLogCtxFunction · 0.85
DatabaseLogCtxFunction · 0.85
AuditLogCtxFunction · 0.85
EffectiveUserIDLogCtxFunction · 0.85
KeyspaceLogCtxFunction · 0.85

Calls 1

getContextKeyMethod · 0.65

Tested by 2

TestCtxFunction · 0.68
TestLogFormatFunction · 0.68