]> source.dussan.org Git - gitea.git/commitdiff
Fix #5866: Silence console logger in gitea serv (#5887) (#5943)
authorzeripath <art27@cantab.net>
Sun, 3 Feb 2019 18:50:41 +0000 (18:50 +0000)
committertechknowlogick <matti@mdranta.net>
Sun, 3 Feb 2019 18:50:41 +0000 (13:50 -0500)
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 <art27@cantab.net>
cmd/serv.go

index ba500ee385581d24d8bc82419b14c979f43d2f85..21a69b24d64990137f675fe78b91f37f00868bd7 100644 (file)
@@ -70,6 +70,7 @@ func checkLFSVersion() {
 }
 
 func setup(logPath string) {
+       log.DelLogger("console")
        setting.NewContext()
        checkLFSVersion()
        log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))