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

Function DatabaseLogCtx

base/logging_context.go:230–235  ·  view source on GitHub ↗

DatabaseLogCtx extends the parent context with a database name.

(parent context.Context, databaseName string, config *DbLogConfig)

Source from the content-addressed store, hash-verified

228
229// DatabaseLogCtx extends the parent context with a database name.
230func DatabaseLogCtx(parent context.Context, databaseName string, config *DbLogConfig) context.Context {
231 newCtx := getLogCtx(parent)
232 newCtx.Database = databaseName
233 newCtx.DbLogConfig = config
234 return LogContextWith(parent, &newCtx)
235}
236
237// AuditLogCtx extends the parent context with additional audit fields
238func AuditLogCtx(parent context.Context, additionalAuditFields map[string]any) context.Context {

Callers 15

addDatabaseLogContextMethod · 0.92
fillToSeqMethod · 0.92
saveAttachmentMethod · 0.92
addDatabaseLogContextMethod · 0.92
TestOneShotGrantTimingFunction · 0.92
NewDatabaseContextFunction · 0.92
AddDatabaseLogContextMethod · 0.92
createNewTestDocumentFunction · 0.92

Calls 2

getLogCtxFunction · 0.85
LogContextWithFunction · 0.85

Tested by 12

fillToSeqMethod · 0.74
TestOneShotGrantTimingFunction · 0.74
createNewTestDocumentFunction · 0.74
TestCBGTIndexCreationFunction · 0.68
BenchmarkAuditFieldworkFunction · 0.68
TestLogFormatFunction · 0.68
TestCtxWorkflowFunction · 0.68