From 2902b3a68c95ddc9bfe9963031ae3454a5bb7d29 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 3 Feb 2019 11:19:28 +0000 Subject: [PATCH] Fix #5866: Silence console logger in gitea serv (#5887) By default, if `setting.NewContext()` prints out any warning logs, these are printed to the stdout breaking `git receive-pack` etc. meaning that even if there is a warning because of a minor problem in your app.ini but gitea starts despite this - you **CANNOT** push or pull over SSH. This PR disables the console logger whilst in `serv.go` Signed-off-by: Andrew Thornton --- cmd/serv.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/serv.go b/cmd/serv.go index ec2258412f..1b65dab2b3 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -70,6 +70,7 @@ func checkLFSVersion() { } func setup(logPath string) { + log.DelLogger("console") setting.NewContext() checkLFSVersion() log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))