Don't redirect error_log to stderr
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3.5k
- Forks
- 1.8k
- Avg merge
- 42m
- Merged PRs (30d)
- 2
Description
Describe the bug
According to https://nginx.org/en/docs/ngx_core_module.html#error_log default error_log level for Nginx should be error, but official docker image is built with level notice. 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:
- Run the NGINX Docker image.
- Check /var/log/nginx/error.log for startup notices (which are not actually errors).
Expected behavior
error_log should be set to error or maybe warn level, definitely not notice.
Your environment
- nginx:1.25.1-alpine-slim
- Kubernetes / Docker Desktop
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the nginx:1.25.1-alpine-slim Docker image and inspect the configuration responsible for /var/log/nginx/error.log. Confirm that startup notices appear after a graceful restart, then verify that the configured error_log level prevents those notices from being emitted as errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nginx
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100