mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-11-24 00:33:09 -05:00
syslog-ng: add receive timestamps to nginx logs
Since nginx only uses 1 second precision for the error logs and syslog timestamps, we can use receive time on the syslog-ng side. We can switch to source time once nginx adds RFC 5424 support which is currently in an open pull request but will likely require changes to add a configuration option for it. Our approach to working around this within nginx doesn't work perfectly since $msec generates the time on-demand separately from the timestamp used by $time_iso8601.
This commit is contained in:
parent
a45b8ada72
commit
b80f10f396
1 changed files with 2 additions and 2 deletions
|
|
@ -6,10 +6,10 @@ source s_nginx_error {
|
|||
};
|
||||
|
||||
destination d_nginx_access {
|
||||
file("/var/log/nginx/access.log" template("${MESSAGE}\n"));
|
||||
file("/var/log/nginx/access.log" template("${R_ISODATE} ${MESSAGE}\n"));
|
||||
};
|
||||
destination d_nginx_error {
|
||||
file("/var/log/nginx/error.log" template("${MESSAGE}\n"));
|
||||
file("/var/log/nginx/error.log" template("${R_ISODATE} ${MESSAGE}\n"));
|
||||
};
|
||||
|
||||
log {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue