【问题标题】:Is it possible to strip out certain logging from nginx error log?是否可以从 nginx 错误日志中删除某些日志记录?
【发布时间】:2019-05-09 11:48:25
【问题描述】:

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

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

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

【问题讨论】:

    标签: nginx error-logging


    【解决方案1】:

    一种可能的解决方案是通过将您的 error_log 配置行更改为仅记录信息 ALERT 或 NOTICE 级别及更高级别:

    error_log 日志/error.log 警报;

    error_log 日志/error.log 通知;

    【讨论】:

      猜你喜欢
      • 2013-09-07
      • 1970-01-01
      • 2019-12-20
      • 1970-01-01
      • 2022-10-14
      • 1970-01-01
      • 1970-01-01
      • 2021-08-21
      • 1970-01-01
      相关资源
      最近更新 更多