是否可以从Nginx错误日志中删除某些日志记录?

时间:2019-05-09 11:48:25

标签: nginx error-logging

在我的具有nginx和calico容器的Kubernetes集群中,关于连接,nginx容器中有很多日志(在INFO级别)来自calico容器。

2019/01/01 11:43:11 [info] 5130#0: *26124 client closed connection while SSL handshaking, client: xxx.xxx.xx.xxx, server: 0.0.0.0:xxx

我想知道是否有办法抑制它们。谢谢。

1 个答案:

答案 0 :(得分:0)

一种可能的解决方案是通过将error_log配置行更改为以下内容来仅记录ALERT或NOTICE级别的信息:

error_log日志/error.log警报;

error_log日志/error.log通知;