From d0e1fd90fd669f64c65dc34697b810084e2d79bc Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 29 Nov 2019 10:50:13 +0000 Subject: [PATCH] Add error stack to error log --- db/executor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/executor.go b/db/executor.go index 3716930c..9446fbf7 100644 --- a/db/executor.go +++ b/db/executor.go @@ -51,6 +51,7 @@ func newExecutor(id, ns, db string) (e *executor) { e.db = db e.err = nil + e.buf = nil e.data = sync.Map{} @@ -203,6 +204,7 @@ func (e *executor) conduct(ctx context.Context, stm sql.Statement) { logKeyVars: ctx.Value(ctxKeyVars), logKeyTime: time.Since(e.time).String(), logKeyError: detail(e.err), + logKeyStack: string(debug.Stack()), }).Errorln(stm) } }