From 9c101af74a95c3852f52cb6dd9a1f1d93d014e86 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 3 Dec 2019 10:03:00 +0000 Subject: [PATCH] Add error logging to kvs package --- kvs/rixxdb/tx.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kvs/rixxdb/tx.go b/kvs/rixxdb/tx.go index 27e6a8bc..8dab5834 100644 --- a/kvs/rixxdb/tx.go +++ b/kvs/rixxdb/tx.go @@ -19,6 +19,7 @@ import ( "github.com/abcum/rixxdb" "github.com/abcum/surreal/kvs" + "github.com/abcum/surreal/log" ) type TX struct { @@ -28,6 +29,7 @@ type TX struct { func one(res *rixxdb.KV, err error) (kvs.KV, error) { if err != nil { + log.WithPrefix("kvs").Errorln(err) return nil, &kvs.DBError{Err: err} } @@ -38,6 +40,7 @@ func one(res *rixxdb.KV, err error) (kvs.KV, error) { func many(res []*rixxdb.KV, err error) ([]kvs.KV, error) { if err != nil { + log.WithPrefix("kvs").Errorln(err) return nil, &kvs.DBError{Err: err} }