-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Stop logging IPs to storage #299
Conversation
tested deployment on c2.testrun.org manually, nginx logs are now in journald. But: journald is still keeping logs, even after a reboot :| I'll investigate |
nvm, it actually works, but it still showed the logs created before setting journalctl to volatile |
missed one commit, was part of the test tho |
@@ -1,7 +1,7 @@ | |||
user www-data; | |||
worker_processes auto; | |||
pid /run/nginx.pid; | |||
error_log /var/log/nginx/error.log; | |||
error_log stderr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why error_log goes to stderr and access_log goes to syslog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stderr goes automatically into journald, but with the correct facility as far as I understood it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so errors are facility 3 (error) and access_logs are per default facility local7 (news)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you can set facility=local3
: https://nginx.org/en/docs/syslog.html
I think it's easier to understand if everything goes to syslog with explicitly set facility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also fine by me. I'll change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise if we decided to setup rsyslog or something else to listen on syslog, logging directly to stderr will bypass it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
closes #294