Print usefull error if SQLite is used in settings but not supported (#14476)
* move log output to points where they are relefant * check explicit of sqlite3 in settings
This commit is contained in:
parent
5845c87b31
commit
b2c20b68a0
|
@ -126,6 +126,7 @@ func GlobalInit(ctx context.Context) {
|
||||||
if !setting.InstallLock {
|
if !setting.InstallLock {
|
||||||
log.Fatal("Gitea is not installed")
|
log.Fatal("Gitea is not installed")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := git.Init(ctx); err != nil {
|
if err := git.Init(ctx); err != nil {
|
||||||
log.Fatal("Git module init failed: %v", err)
|
log.Fatal("Git module init failed: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -134,6 +135,7 @@ func GlobalInit(ctx context.Context) {
|
||||||
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
|
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
|
||||||
log.Trace("Custom path: %s", setting.CustomPath)
|
log.Trace("Custom path: %s", setting.CustomPath)
|
||||||
log.Trace("Log path: %s", setting.LogRootPath)
|
log.Trace("Log path: %s", setting.LogRootPath)
|
||||||
|
checkRunMode()
|
||||||
|
|
||||||
// Setup i18n
|
// Setup i18n
|
||||||
translation.InitLocales()
|
translation.InitLocales()
|
||||||
|
@ -143,6 +145,12 @@ func GlobalInit(ctx context.Context) {
|
||||||
highlight.NewContext()
|
highlight.NewContext()
|
||||||
external.RegisterParsers()
|
external.RegisterParsers()
|
||||||
markup.Init()
|
markup.Init()
|
||||||
|
|
||||||
|
if setting.EnableSQLite3 {
|
||||||
|
log.Info("SQLite3 Supported")
|
||||||
|
} else if setting.Database.UseSQLite3 {
|
||||||
|
log.Fatal("SQLite3 is set in settings but NOT Supported")
|
||||||
|
}
|
||||||
if err := initDBEngine(ctx); err == nil {
|
if err := initDBEngine(ctx); err == nil {
|
||||||
log.Info("ORM engine initialization successful!")
|
log.Info("ORM engine initialization successful!")
|
||||||
} else {
|
} else {
|
||||||
|
@ -175,11 +183,6 @@ func GlobalInit(ctx context.Context) {
|
||||||
}
|
}
|
||||||
eventsource.GetManager().Init()
|
eventsource.GetManager().Init()
|
||||||
|
|
||||||
if setting.EnableSQLite3 {
|
|
||||||
log.Info("SQLite3 Supported")
|
|
||||||
}
|
|
||||||
checkRunMode()
|
|
||||||
|
|
||||||
if setting.SSH.StartBuiltinServer {
|
if setting.SSH.StartBuiltinServer {
|
||||||
ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
|
ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
|
||||||
log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
|
log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
|
||||||
|
|
Loading…
Reference in a new issue