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

Function getLogCtx

base/logging_context.go:190–196  ·  view source on GitHub ↗

getLogContext returns a log context possibly extending from previous context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

188
189// getLogContext returns a log context possibly extending from previous context.
190func getLogCtx(ctx context.Context) LogContext {
191 parentLogCtx, ok := ctx.Value(requestContextKey).(*LogContext)
192 if !ok {
193 return LogContext{}
194 }
195 return parentLogCtx.getCopy()
196}
197
198// BucketNameCtx extends the parent context with a bucket name.
199func BucketNameCtx(parent context.Context, bucketName string) context.Context {

Callers 13

expandFieldsFunction · 0.85
shouldLogMethod · 0.85
BucketNameCtxFunction · 0.85
CollectionLogCtxFunction · 0.85
CorrelationIDLogCtxFunction · 0.85
DatabaseLogCtxFunction · 0.85
AuditLogCtxFunction · 0.85
EffectiveUserIDLogCtxFunction · 0.85
KeyspaceLogCtxFunction · 0.85
UserLogCtxFunction · 0.85
RequestLogCtxFunction · 0.85

Calls 2

getCopyMethod · 0.80
ValueMethod · 0.45

Tested by

no test coverage detected