-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Don't redirect error_log to stderr #940
Comments
@ViliusS you are free to change the error log level to any value you prefer. Though as you can spot from your screenshot |
OK, thinking about this further, it is a bug in a way error log is redirected to stderr then. If |
I'm not entirely following the logic here - why do you think it should not be forwarded to a separate fd at all? |
I don't think it should not be forwarded at all. I'm saying it should not be forwarded specifically to |
I mean, it's best to have more information on what's going on than less information. This is why we have it set to something that is verbose but still not spammy. We definitely won't be changing forwarding error logs to something else other than I think in your case it's just a matter of setting up proper filtering for what you'd consider an alert-worthy event. |
I don't understand your arguments. You say that it is set to "something not spammy", but I'm telling you how the image behaves by default under most containerized conditions and it is the opposite. The workaround solution is not really easy. One would need to write nginx error_log to JSON converter with severity included for every log message. Only then those messages would be logged at correct severity level on SaaS environments. Filtering alerts by simple string (e.g. "gracefully shuting down" or "exiting") would be insane. Another way would be to completely rebuild docker image. Which can be done, but I filled this issue wanting to fix the issue at the source, not make another workaround. I also don't buy the argument that something which was designed wrong in the first place cannot be changed now. At least remove symlink redirect at docker image level and leave the control to nginx configuration. |
Describe the bug
According to https://nginx.org/en/docs/ngx_core_module.html#error_log default
error_log
level for Nginx should beerror
, but official docker image is built with levelnotice
. This produces all sorts of issues in logging/monitoring systems. Most often, just graceful ordinary restart produces errors in logs (and then alerts).To reproduce
Steps to reproduce the behavior:
Expected behavior
error_log
should be set toerror
or maybewarn
level, definitely notnotice
.Your environment
The text was updated successfully, but these errors were encountered: