log: add basic database write debug logging
A series of settings can be found in Settings > Advanced for logging writes to the database, for each main storage object. "All" logs all writes, "Deletion" logs Delete* Calls and Write* calls where the principal data in the object (e.g. address in an EmailAddress object) is set to "".
This commit is contained in:
@@ -246,8 +246,12 @@ func start(asDaemon, firstCall bool) {
|
||||
}
|
||||
if debugMode {
|
||||
app.debug = logger.NewLogger(os.Stdout, "[DEBUG] ", log.Ltime|log.Lshortfile, color.FgYellow)
|
||||
// Bind debug log
|
||||
app.storage.debug = app.debug
|
||||
app.storage.logActions = generateLogActions(app.config)
|
||||
} else {
|
||||
app.debug = logger.NewEmptyLogger()
|
||||
app.storage.debug = nil
|
||||
}
|
||||
if *PPROF {
|
||||
app.info.Print(warning("\n\nWARNING: Don't use pprof in production.\n\n"))
|
||||
|
||||
Reference in New Issue
Block a user