mirror of
https://github.com/gogs/gogs.git
synced 2026-01-18 21:32:21 +01:00
cmd: init logging before SetEngine (#6001)
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user