refactor(log): replace log.Critical with log.Error (#37624)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
This commit is contained in:
Copilot
2026-05-09 16:32:49 +00:00
committed by GitHub
parent 093c9e8ee6
commit 0a3aaeafe7
11 changed files with 13 additions and 17 deletions

View File

@@ -150,7 +150,7 @@ func serveInstall(cmd *cli.Command) error {
c := install.Routes()
err := listen(c, false)
if err != nil {
log.Critical("Unable to open listener for installer. Is Gitea already running?")
log.Error("Unable to open listener for installer. Is Gitea already running?")
graceful.GetManager().DoGracefulShutdown()
}
select {
@@ -375,7 +375,7 @@ func listen(m http.Handler, handleRedirector bool) error {
log.Fatal("Invalid protocol: %s", setting.Protocol)
}
if err != nil {
log.Critical("Failed to start server: %v", err)
log.Error("Failed to start server: %v", err)
}
log.Info("HTTP Listener: %s Closed", listenAddr)
return err