505be0d8bc
This commit adds the compaction feature of the bbolt compact to our bolt backend. This will try to open the DB in read-only mode and create a compacted copy in a temporary file. Once the compaction was successful, the temporary file and the old source file are swapped atomically.
13 lines
344 B
Go
13 lines
344 B
Go
package kvdb
|
|
|
|
import "github.com/btcsuite/btclog"
|
|
|
|
// log is a logger that is initialized as disabled. This means the package will
|
|
// not perform any logging by default until a logger is set.
|
|
var log = btclog.Disabled
|
|
|
|
// UseLogger uses a specified Logger to output package logging info.
|
|
func UseLogger(logger btclog.Logger) {
|
|
log = logger
|
|
}
|