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

Function ImplicitDefaultCollectionLogCtx

base/logging_context.go:214–220  ·  view source on GitHub ↗

ImplicitDefaultCollectionCtx extends the parent context with _default._default collection. When logging, col:_default will not be shown.

(parent context.Context)

Source from the content-addressed store, hash-verified

212
213// ImplicitDefaultCollectionCtx extends the parent context with _default._default collection. When logging, col:_default will not be shown.
214func ImplicitDefaultCollectionLogCtx(parent context.Context) context.Context {
215 newCtx := getLogCtx(parent)
216 newCtx.implicitDefaultCollection = true
217 newCtx.Scope = DefaultScope
218 newCtx.Collection = DefaultCollection
219 return LogContextWith(parent, &newCtx)
220}
221
222// CorrelationIDCtx extends the parent context with a correlation ID (HTTP request ID, BLIP context ID, etc.)
223func CorrelationIDLogCtx(parent context.Context, correlationID string) context.Context {

Callers 2

TestLogFormatFunction · 0.85

Calls 2

getLogCtxFunction · 0.85
LogContextWithFunction · 0.85

Tested by 1

TestLogFormatFunction · 0.68