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

Function InitializeMemoryLoggers

base/logging_config.go:164–171  ·  view source on GitHub ↗

InitializeMemoryLoggers will set the global loggers to a in-memory logging buffer, to be flushed to configured outputs at a later time.

()

Source from the content-addressed store, hash-verified

162
163// InitializeMemoryLoggers will set the global loggers to a in-memory logging buffer, to be flushed to configured outputs at a later time.
164func InitializeMemoryLoggers() {
165 errorLogger.Store(NewMemoryLogger(LevelError))
166 warnLogger.Store(NewMemoryLogger(LevelWarn))
167 infoLogger.Store(NewMemoryLogger(LevelInfo))
168 debugLogger.Store(NewMemoryLogger(LevelDebug))
169 traceLogger.Store(NewMemoryLogger(LevelTrace))
170 statsLogger.Store(NewMemoryLogger(LevelNone))
171}
172
173func FlushLoggerBuffers() {
174 for _, logger := range getFileLoggers() {

Callers 9

TestAuditLoggingFieldsFunction · 0.92
TestEffectiveUserIDFunction · 0.92
TestAuditLoggingGlobalsFunction · 0.92
TestLogFlushFunction · 0.92
serverMainFunction · 0.92
TestConfigEndpointFunction · 0.92

Calls 2

NewMemoryLoggerFunction · 0.85
StoreMethod · 0.80

Tested by 8

TestAuditLoggingFieldsFunction · 0.74
TestEffectiveUserIDFunction · 0.74
TestAuditLoggingGlobalsFunction · 0.74
TestLogFlushFunction · 0.74
TestConfigEndpointFunction · 0.74