diff options
author | zeripath <art27@cantab.net> | 2019-02-03 11:19:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-03 11:19:28 +0000 |
commit | 2902b3a68c95ddc9bfe9963031ae3454a5bb7d29 (patch) | |
tree | 5d60c2b71b27b8c63ef5f95127826a2f3e17dafb | |
parent | f81c6cc2a90fa4d92e0fc00834ddee66b37f44b7 (diff) | |
download | gitea-2902b3a68c95ddc9bfe9963031ae3454a5bb7d29.tar.gz gitea-2902b3a68c95ddc9bfe9963031ae3454a5bb7d29.zip |
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>
-rw-r--r-- | cmd/serv.go | 1 |
1 files changed, 1 insertions, 0 deletions
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)) |