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

Function UpdateLogKeys

base/logging.go:38–53  ·  view source on GitHub ↗

UpdateLogKeys updates the console's log keys from a map

(ctx context.Context, keys map[string]bool, replace bool)

Source from the content-addressed store, hash-verified

36
37// UpdateLogKeys updates the console's log keys from a map
38func UpdateLogKeys(ctx context.Context, keys map[string]bool, replace bool) {
39 if replace {
40 ConsoleLogKey().Set(logKeyMask(KeyNone))
41 }
42
43 for k, v := range keys {
44 key := strings.Replace(k, "+", "", -1)
45 if v {
46 ConsoleLogKey().Enable(logKeyNamesInverse[key])
47 } else {
48 ConsoleLogKey().Disable(logKeyNamesInverse[key])
49 }
50 }
51
52 InfofCtx(ctx, KeyAll, "Setting log keys to: %v", ConsoleLogKey().EnabledLogKeys())
53}
54
55// Returns a string identifying a function on the call stack.
56// Use depth=1 for the caller of the function that calls GetCallersName, etc.

Callers 2

handlePutConfigMethod · 0.92
handleSetLoggingMethod · 0.92

Calls 7

ConsoleLogKeyFunction · 0.85
logKeyMaskFunction · 0.85
EnableMethod · 0.80
DisableMethod · 0.80
EnabledLogKeysMethod · 0.80
InfofCtxFunction · 0.70
SetMethod · 0.45

Tested by

no test coverage detected