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 |
| worker_processes auto; | ||
| pid /run/nginx.pid; | ||
| error_log /var/log/nginx/error.log; | ||
| error_log stderr; |
There was a problem hiding this comment.
Why error_log goes to stderr and access_log goes to syslog?
There was a problem hiding this comment.
stderr goes automatically into journald, but with the correct facility as far as I understood it
There was a problem hiding this comment.
so errors are facility 3 (error) and access_logs are per default facility local7 (news)
There was a problem hiding this comment.
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.
also fine by me. I'll change it
There was a problem hiding this comment.
Otherwise if we decided to setup rsyslog or something else to listen on syslog, logging directly to stderr will bypass it
closes #294