Closed isbm closed 5 years ago
This adds a convenience function, same to SetCodec etc to set an alternative logger, such as logrus etc.
SetCodec
logrus
Currently it is possible this way:
path = "/tmp/foo" options := badger.DefaultOptions(path) options.Logger = logrus.New() db, err = bow.Open(path, bow.SetBadgerOptions(options)) ...
But also could be possible just this, if the case is to only swap quite verbose Badger's logging:
path = "/tmp/foo" db, err := bow.Open(path, bow.SetLogger(logrus.New()))
That's neat. Thanks for contributing!
This adds a convenience function, same to
SetCodec
etc to set an alternative logger, such aslogrus
etc.Currently it is possible this way:
But also could be possible just this, if the case is to only swap quite verbose Badger's logging: