-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In gitea serv switch off console logger to fix #5866 #5887
In gitea serv switch off console logger to fix #5866 #5887
Conversation
By default warning logs are printed to the stdout which breaks a git receive-pack etc. This PR disables the console logger whilst in serv.go Signed-off-by: Andrew Thornton <art27@cantab.net>
Codecov Report
@@ Coverage Diff @@
## master #5887 +/- ##
==========================================
+ Coverage 38.27% 38.29% +0.01%
==========================================
Files 330 330
Lines 48518 48518
==========================================
+ Hits 18572 18578 +6
+ Misses 27273 27266 -7
- Partials 2673 2674 +1
Continue to review full report at Codecov.
|
Maybe del the logger after |
I think it's fine for Gitea serv to be silent for these warnings - it's not meant to be used by humans. Emitting anything on the console will break git causing it to hang on the client. |
Basically without this PR - If warnings are emitted because of a minor problem in app.ini that doesn't stop gitea from running - you cannot push or pull over ssh. |
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>
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>
By default, if
setting.NewContext()
prints out any warning logs, these are printed to the stdout breakinggit 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
Fix #5866
Signed-off-by: Andrew Thornton art27@cantab.net