cmd: init logging before `SetEngine` (#6001)

pull/6026/head
ᴜɴᴋɴᴡᴏɴ 2020-03-22 14:11:52 +08:00 committed by GitHub
parent 5843038a08
commit 82e511ddb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -145,6 +145,7 @@ func runCreateUser(c *cli.Context) error {
if err != nil {
return errors.Wrap(err, "init configuration")
}
conf.InitLogging(true)
if err = db.SetEngine(); err != nil {
return errors.Wrap(err, "set engine")
@ -170,6 +171,7 @@ func adminDashboardOperation(operation func() error, successMessage string) func
if err != nil {
return errors.Wrap(err, "init configuration")
}
conf.InitLogging(true)
if err = db.SetEngine(); err != nil {
return errors.Wrap(err, "set engine")

View File

@ -51,6 +51,7 @@ func runBackup(c *cli.Context) error {
if err != nil {
return errors.Wrap(err, "init configuration")
}
conf.InitLogging(true)
if err = db.SetEngine(); err != nil {
return errors.Wrap(err, "set engine")

View File

@ -98,6 +98,7 @@ func runRestore(c *cli.Context) error {
if err != nil {
return errors.Wrap(err, "init configuration")
}
conf.InitLogging(true)
if err = db.SetEngine(); err != nil {
return errors.Wrap(err, "set engine")