【发布时间】:2019-12-18 19:16:48
【问题描述】:
我们喜欢使用“顾问”进行监控。
如何提高日志记录级别以减少记录的数据量?
我阅读了有关“-v=0”命令参数的信息,但找不到更多文档。
【问题讨论】:
标签: cadvisor
我们喜欢使用“顾问”进行监控。
如何提高日志记录级别以减少记录的数据量?
我阅读了有关“-v=0”命令参数的信息,但找不到更多文档。
【问题讨论】:
标签: cadvisor
cAdvisor 的日志记录取自 glog。如果您通过其他一些存储库跟踪 cmets,您最终会到达这里:https://github.com/google/glog/blob/master/doc/glog.html
对你来说重要的部分是:
INFO、WARNING、ERROR和FATAL的严重级别数分别为0、1、2和3。
因此使用相应设置的-v 标志来清理您的日志文件
【讨论】:
-v=2
--v=0 更改为--v=1,但没有办法减少数字,只有严重性报告。
你可以试试:
--log_dir="" #: If non-empty, write log files in this directory
--logtostderr=false #: log to standard error instead of files
--alsologtostderr=false #: log to standard error as well as files
--stderrthreshold=0 #: logs at or above this threshold go to stderr
--v=1 #: log level for V logs
--vmodule= #: comma-separated list of pattern=N settings for file-filtered logging
但根据GitHub documentation,目前没有办法这样做。
【讨论】:
--v=1 应该增加发送错误所需的阈值