mirror of
https://github.com/gogs/gogs.git
synced 2025-05-28 02:02:09 +00:00
cmd: init logging before SetEngine
(#6001)
This commit is contained in:
parent
5843038a08
commit
82e511ddb1
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user