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

Function CollectionLogCtx

base/logging_context.go:206–211  ·  view source on GitHub ↗

CollectionCtx extends the parent context with a collection name.

(parent context.Context, scopeName, collectionName string)

Source from the content-addressed store, hash-verified

204
205// CollectionCtx extends the parent context with a collection name.
206func CollectionLogCtx(parent context.Context, scopeName, collectionName string) context.Context {
207 newCtx := getLogCtx(parent)
208 newCtx.Scope = scopeName
209 newCtx.Collection = collectionName
210 return LogContextWith(parent, &newCtx)
211}
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 {

Callers 6

NewDatabaseContextFunction · 0.92
AddCollectionContextMethod · 0.92
TestLogFormatFunction · 0.85

Calls 2

getLogCtxFunction · 0.85
LogContextWithFunction · 0.85

Tested by 1

TestLogFormatFunction · 0.68