mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 01:10:44 +00:00
Fix issues with persist flag; Use custom logger for badger
This commit is contained in:
@@ -15,6 +15,7 @@ type BadgerDataStoreOptions struct {
|
||||
|
||||
func NewBadgerDataStore(options BadgerDataStoreOptions) *BadgerDataStore {
|
||||
badgerOpts := badger.DefaultOptions(options.PersistDataFilePath)
|
||||
badgerOpts = badgerOpts.WithLogger(newBadgerLogger())
|
||||
if options.PersistDataFilePath == "" {
|
||||
badgerOpts = badgerOpts.WithInMemory(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user