1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00

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 <art27@cantab.net>
This commit is contained in:
zeripath 2019-02-03 11:19:28 +00:00 committed by GitHub
parent f81c6cc2a9
commit 2902b3a68c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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