-
-
Notifications
You must be signed in to change notification settings - Fork 145
Logs for nginx under /config/log/nginx
#713
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
base: main
Are you sure you want to change the base?
Conversation
This does quick and dirty rotation of the nginx directory. This is needed because of the earlier ownership / permissions changes not accounting for the web server user. Also, the logs won't grow forever; which is nice.
The error log contains informational and higher levels on the theory that when something goes wrong we will want as much information as we can get about why an error occurred. Access log is compressed, in memory, then written to disk every minute. Most people will take about that long to start reading the file anyway.
|
Doesn't this break HTTP request logging for the container in general? As in, removes it from the standard stdout and writes it to disk? Also unless I've missed it this doesn't have any log rotation by default? |
Removing the access log from
The rotation is happening before starting |
|
@meeb The merge conflict has been resolved. |
|
Thanks. I'm on the fence with this one, your patch is fine, it's a philosophical difference. I prefer containers to write their logs, all of them, to stdout. I don't think the web server gets enough traffic for this "spam" to be significant. Is there a core reason to divert some of the logs to disk and potentially bypassing general container log analysis tools? |
|
I personally almost never care about the web access logs. They are annoying and in the way when I want to follow what is happening. A wishlist item might be to have a way to send logs from the web server through the common logger and provide a way to turn displaying them on/off while everything is running. That would solve both of our use cases. |
For #70
I found hat-syslog which looks like an excellent way to handle logs from
nginxand potentially anything else that uses asyslogserver.