From e3634fb4a8242d286c3475a68d71937262289619 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 28 Feb 2017 00:19:21 +0000 Subject: [PATCH] Improve SQL debug logging --- db/db.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db.go b/db/db.go index 8d6cd237..6f8dc6d9 100644 --- a/db/db.go +++ b/db/db.go @@ -241,7 +241,9 @@ func (e *executor) execute(quit <-chan bool, send chan<- *Response) { // speed, so we can analyse slow queries. log.WithPrefix("sql").WithFields(map[string]interface{}{ - "ctx": e.web, + "id": e.web.Get("id"), + "kind": e.web.Get("auth").(*cnf.Auth).Kind, + "auth": e.web.Get("auth").(*cnf.Auth).Data, }).Debugln(stm) // Check to see if the current statement is