Skip to content

Commit

Permalink
Fix #5866: Silence console logger in gitea serv (#5887)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zeripath authored Feb 3, 2019
1 parent f81c6cc commit 2902b3a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func checkLFSVersion() {
}

func setup(logPath string) {
log.DelLogger("console")
setting.NewContext()
checkLFSVersion()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
Expand Down

0 comments on commit 2902b3a

Please sign in to comment.