1. Manually delete the /var/log/jenkins/jenkins.log file every time, and you need to restart jenkins after deletion, otherwise the space cannot be released.
2. Click System Management-System Log-Log Level, and then increase javax.jmdns to off
Manage Jenkins -> System Log -> Log Levels (on the left)
Name: javax.jmdns
Level: off
http://www.tinygroup.org/blog/detail/fee939817ebf45a6a97ae7cdefc767e6
With pictures: http://blog.csdn.net/qq_33588470/article/details/54647496
Modify JAVA_ARGS in /etc/default/jenkins (location for Debian / Ubuntu installations at least) to disable DNS multicast feature.
Change this: JAVA_ARGS="-Djava.awt.headless=true"
To this: JAVA_ARGS="-Djava.awt.headless=true -Dhudson.DNSMultiCast.disabled=true"
And restart the service service jenkins restart
The main idea is to modify the JAVA_ARGS of the jenkins file. This English is not difficult. Modify the configuration. Translation is the same as no translation.
https://stackoverflow.com/questions/31719756/how-to-stop-jenkins-log-from-becoming-huge
http://brandnewuser.iteye.com/blog/2280833
Modify log configuration (unknown): https://stackoverflow.com/questions/22783471/limiting-log-size-of-jenkins-log-or-hudson-log
/var/log/jenkins/jenkins.log /var/log/jenkins/access_log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 644
postrotate
if [ -s /var/run/jenkins.pid ]; then
JPID = `cat / var / run / jenkins.pid`
test -n "`find /proc/$JPID -maxdepth 0 -user jenkins 2>/dev/null`" && /bin/kill -s ALRM $JPID || :
be
endscript
}
/var/log/jenkins/jenkins.log {
weekly
copytruncate
missingok
rotate 52
compress
delaycompress
notifempty
}
In the process, I found a fun thing to add color to the log: https://zhuanlan.zhihu.com/p/22032462?refer=debugtalk