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

查看:435
本文介绍了如何阻止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 Web界面转到:

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天全站免登陆