默认情况下,我的 nginx
服务器正在将日志绘制到 stdout
和 stderr
.
我想将日志转发到我的 syslog 服务器,而且我已经成功地从 nginx.conf
:
server {
...
error_log syslog:server=localhost:5447,facility=local7,tag=nginx_client,severity=error;
access_log syslog:server=localhost:5447,facility=local7,tag=nginx_client,severity=info;
...
}
如何将我的服务器配置为 还有将日志绘制到
stdout
和 stderr
?
最佳答案
块中有多个 error_log 和 access_log 条目
error_log syslog:server=localhost:5447,facility=local7,tag=nginx_client,severity=error;
access_log syslog:server=localhost:5447,facility=local7,tag=nginx_client,severity=info;
error_log stderr;
access_log /dev/stdout;
应该做的伎俩
关于nginx - 将 nginx 日志发送到 syslog 和 stdout/stderr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52984329/