Skip to content

Commit d16c165

Browse files
unknwonmpsonntag
authored andcommitted
cmd: init logging before SetEngine (#6001)
1 parent 1944425 commit d16c165

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

internal/cmd/admin.go

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ func runCreateUser(c *cli.Context) error {
146146
if err != nil {
147147
return errors.Wrap(err, "init configuration")
148148
}
149+
conf.InitLogging(true)
149150

150151
if err = db.SetEngine(); err != nil {
151152
return errors.Wrap(err, "set engine")
@@ -171,6 +172,7 @@ func adminDashboardOperation(operation func() error, successMessage string) func
171172
if err != nil {
172173
return errors.Wrap(err, "init configuration")
173174
}
175+
conf.InitLogging(true)
174176

175177
if err = db.SetEngine(); err != nil {
176178
return errors.Wrap(err, "set engine")

internal/cmd/backup.go

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func runBackup(c *cli.Context) error {
5151
if err != nil {
5252
return errors.Wrap(err, "init configuration")
5353
}
54+
conf.InitLogging(true)
5455

5556
if err = db.SetEngine(); err != nil {
5657
return errors.Wrap(err, "set engine")

internal/cmd/restore.go

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ func runRestore(c *cli.Context) error {
9898
if err != nil {
9999
return errors.Wrap(err, "init configuration")
100100
}
101+
conf.InitLogging(true)
101102

102103
if err = db.SetEngine(); err != nil {
103104
return errors.Wrap(err, "set engine")

0 commit comments

Comments
 (0)