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

Function DefaultPerDBLogging

rest/config_database.go:92–107  ·  view source on GitHub ↗
(bootstrapLoggingCnf base.LoggingConfig)

Source from the content-addressed store, hash-verified

90}
91
92func DefaultPerDBLogging(bootstrapLoggingCnf base.LoggingConfig) *DbLoggingConfig {
93 dblc := &DbLoggingConfig{}
94 if bootstrapLoggingCnf.Console != nil {
95 if *bootstrapLoggingCnf.Console.Enabled {
96 dblc.Console = &DbConsoleLoggingConfig{
97 LogLevel: bootstrapLoggingCnf.Console.LogLevel,
98 LogKeys: bootstrapLoggingCnf.Console.LogKeys,
99 }
100 }
101 }
102 dblc.Audit = &DbAuditLoggingConfig{
103 Enabled: base.Ptr(base.DefaultDbAuditEnabled),
104 EnabledEvents: &base.DefaultDbAuditEventIDs,
105 }
106 return dblc
107}
108
109// MergeDatabaseConfigWithDefaults merges the passed in config onto a DefaultDbConfig which results in returned value
110// being populated with defaults when not set

Callers 2

DefaultDbConfigFunction · 0.85

Calls 1

PtrFunction · 0.92

Tested by 1