Add error logging to kvs package
This commit is contained in:
parent
63cbb59bae
commit
9c101af74a
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,7 @@ import (
|
||||||
|
|
||||||
"github.com/abcum/rixxdb"
|
"github.com/abcum/rixxdb"
|
||||||
"github.com/abcum/surreal/kvs"
|
"github.com/abcum/surreal/kvs"
|
||||||
|
"github.com/abcum/surreal/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TX struct {
|
type TX struct {
|
||||||
|
@ -28,6 +29,7 @@ type TX struct {
|
||||||
func one(res *rixxdb.KV, err error) (kvs.KV, error) {
|
func one(res *rixxdb.KV, err error) (kvs.KV, error) {
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.WithPrefix("kvs").Errorln(err)
|
||||||
return nil, &kvs.DBError{Err: 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) {
|
func many(res []*rixxdb.KV, err error) ([]kvs.KV, error) {
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.WithPrefix("kvs").Errorln(err)
|
||||||
return nil, &kvs.DBError{Err: err}
|
return nil, &kvs.DBError{Err: err}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue