f-25: add propre log for init db
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
7078691db6
commit
e545b70d53
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package kv
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/dgraph-io/badger/v4"
|
||||
)
|
||||
|
||||
|
|
@ -15,7 +17,7 @@ func InitDB(conf Config, readonly bool) *badger.DB {
|
|||
opts.NumLevelZeroTablesStall = 2
|
||||
db, err := badger.Open(opts)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
log.Fatalf("kv.InitDB (readonly=%v, path=%s): %v", readonly, conf.Path, err)
|
||||
}
|
||||
return db
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue