Skip to content

Commit 2902b3a

Browse files
authored
Fix go-gitea#5866: Silence console logger in gitea serv (go-gitea#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 <[email protected]>
1 parent f81c6cc commit 2902b3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/serv.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func checkLFSVersion() {
7070
}
7171

7272
func setup(logPath string) {
73+
log.DelLogger("console")
7374
setting.NewContext()
7475
checkLFSVersion()
7576
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))

0 commit comments

Comments
 (0)