如何阻止 Jenkins 日志变得巨大? [英] How to stop Jenkins log from becoming huge?

查看:19
本文介绍了如何阻止 Jenkins 日志变得巨大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我的 jenkins.log 开始变得非常大,非常快,充满了关于 DNS 解析的异常.我尝试使用logrotate,但日志文件增长太快,甚至无法旋转,而且只会吃掉我所有的磁盘空间,然后导致各种服务因无法再写入文件而失败.

Recently my jenkins.log has started getting very large, very quickly, full of exceptions about DNS resolution. I attempted to use logrotate, but the log file grows too quickly even to be rotated, and just eats up all my disk space, which then causes various services to fail because they cannot write files anymore.

我如何避免这种情况?

推荐答案

您可以通过调整 Jenkins 中的日志记录设置来禁用这些 DNS 错误的日志记录.

You can disable the logging of these DNS errors by adjusting the logging settings within Jenkins.

从 Jenkins 网络界面转到:

From the Jenkins web interface go to:

 Manage Jenkins -> System Log -> Log Levels (on the left)

添加以下条目:

Name: javax.jmdns

Level: off

通过这种方式,您可以保留多播 DNS 功能,但无需所有日志记录数据.

This way you can keep the Multicast DNS feature but without all the logging data.

这篇关于如何阻止 Jenkins 日志变得巨大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆