[nginx-mainline] use syslog for error_log instead of logging to stderr
Task Info (Flyspray) | |
---|---|
Opened By | Daniel Micay (thestinger) |
Task ID | 72061 |
Type | Feature Request |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2021-09-07 11:59:43 UTC |
Status | Assigned |
Assignee | Massimiliano Torromeo (mtorromeo) |
Assignee | Levente Polyak (anthraxx) |
Assignee | Giancarlo Razzolini (grazzolini) |
Assignee | T.J. Townsend (blakkheim) |
Details
Arch currently sets up using journald via stderr with the same log level for everything:
SyslogLevel=err
ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log stderr;'
It would be nicer to use the syslog support to set the severity and time metadata in a structured way.
Can remove SyslogLevel=err and change it to the following:
ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log syslog:server=unix:/dev/log,nohostname;'
The nohostname parameter should be used for local logging since it already has the hostname and there isn't a separate remote one.