Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make badger use our logging framework #50

Merged
merged 1 commit into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import (

osh "github.com/Kubuxu/go-os-helper"
badger "github.com/dgraph-io/badger"

ds "github.com/ipfs/go-datastore"
dsq "github.com/ipfs/go-datastore/query"
logger "github.com/ipfs/go-log"
goprocess "github.com/jbenet/goprocess"
)

var log = logger.Logger("badger")

type Datastore struct {
DB *badger.DB

Expand Down Expand Up @@ -67,6 +69,7 @@ func NewDatastore(path string, options *Options) (*Datastore, error) {

opt.Dir = path
opt.ValueDir = path
opt.Logger = log

kv, err := badger.Open(opt)
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"hash": "QmXuBJ7DR6k3rmUEKtvVMhwjmXDuJgXXPUt4LQXKBMsU93",
"name": "go-os-helper",
"version": "0.0.0"
},
{
"hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF",
"name": "go-log",
"version": "1.5.9"
}
],
"gxVersion": "0.8.0",
Expand Down