-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use current go-log #89
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,19 @@ import ( | |
options "github.com/dgraph-io/badger/options" | ||
ds "github.com/ipfs/go-datastore" | ||
dsq "github.com/ipfs/go-datastore/query" | ||
logger "github.com/ipfs/go-log" | ||
logger "github.com/ipfs/go-log/v2" | ||
goprocess "github.com/jbenet/goprocess" | ||
) | ||
|
||
var log = logger.Logger("badger") | ||
type badgerLog struct { | ||
logger.ZapEventLogger | ||
} | ||
|
||
func (b *badgerLog) Warningf(format string, args ...interface{}) { | ||
b.Warnf(format, args...) | ||
} | ||
|
||
var log = &badgerLog{*logger.Logger("badger")} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is annoying... maybe we should just revert the change we made to go-log and add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we can do that later. |
||
|
||
var ErrClosed = errors.New("datastore closed") | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment explaining why we're doing this.
Also, we might as well only wrap the logger when opening the datastore.