IsAuditLoggingEnabled() checks whether audit logging is enabled for the db, independent of the global setting
()
| 2377 | |
| 2378 | // IsAuditLoggingEnabled() checks whether audit logging is enabled for the db, independent of the global setting |
| 2379 | func (c *DbConfig) IsAuditLoggingEnabled() (enabled bool, events []uint) { |
| 2380 | |
| 2381 | if c != nil && c.Logging != nil && c.Logging.Audit != nil && c.Logging.Audit.Enabled != nil { |
| 2382 | enabled = *c.Logging.Audit.Enabled |
| 2383 | if c.Logging.Audit.EnabledEvents != nil { |
| 2384 | events = *c.Logging.Audit.EnabledEvents |
| 2385 | } |
| 2386 | return enabled, events |
| 2387 | } else { |
| 2388 | // Audit logging not defined in the config. Use default value |
| 2389 | return base.DefaultDbAuditEnabled, nil |
| 2390 | } |
| 2391 | } |
| 2392 | |
| 2393 | // numIndexReplicas returns the number of index replicas for the database, populating the default value if necessary. |
| 2394 | func (c *DbConfig) numIndexReplicas() uint { |
no outgoing calls
no test coverage detected