mirror of
https://github.com/mjl-/mox.git
synced 2025-07-15 03:34:35 +03:00
reduce logging about db schema initializations during tests
they were a bit too noisy, not helpful
This commit is contained in:
@ -57,6 +57,7 @@ import (
|
||||
"github.com/mjl-/mox/mlog"
|
||||
"github.com/mjl-/mox/mox-"
|
||||
"github.com/mjl-/mox/moxio"
|
||||
"github.com/mjl-/mox/moxvar"
|
||||
"github.com/mjl-/mox/publicsuffix"
|
||||
"github.com/mjl-/mox/scram"
|
||||
"github.com/mjl-/mox/smtp"
|
||||
@ -918,7 +919,7 @@ func OpenAccountDB(log mlog.Log, accountDir, accountName string) (a *Account, re
|
||||
os.MkdirAll(accountDir, 0770)
|
||||
}
|
||||
|
||||
opts := bstore.Options{Timeout: 5 * time.Second, Perm: 0660, RegisterLogger: log.Logger}
|
||||
opts := bstore.Options{Timeout: 5 * time.Second, Perm: 0660, RegisterLogger: moxvar.RegisterLogger(dbpath, log.Logger)}
|
||||
db, err := bstore.Open(context.TODO(), dbpath, &opts, DBTypes...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -18,6 +18,7 @@ import (
|
||||
|
||||
"github.com/mjl-/mox/mlog"
|
||||
"github.com/mjl-/mox/mox-"
|
||||
"github.com/mjl-/mox/moxvar"
|
||||
"github.com/mjl-/mox/smtp"
|
||||
)
|
||||
|
||||
@ -54,7 +55,7 @@ func Init(ctx context.Context) error {
|
||||
pkglog := mlog.New("store", nil)
|
||||
p := mox.DataDirPath("auth.db")
|
||||
os.MkdirAll(filepath.Dir(p), 0770)
|
||||
opts := bstore.Options{Timeout: 5 * time.Second, Perm: 0660, RegisterLogger: pkglog.Logger}
|
||||
opts := bstore.Options{Timeout: 5 * time.Second, Perm: 0660, RegisterLogger: moxvar.RegisterLogger(p, pkglog.Logger)}
|
||||
var err error
|
||||
AuthDB, err = bstore.Open(ctx, p, &opts, AuthDBTypes...)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user