How to enable magazine rotation in Jenkins in a week?

I am trying to enable log rotation for jenkins. Because the log file took up more memory space. Are there any plugins or methods for this?

+5
source share
3 answers

Job configuration → Undo old builds:

The default log rotation strategy is:

Jenkins Magazine Rotation

I suggest you click the Advanced button to learn more about this log rotation strategy.

+4
source

Other answers here relate to logs generated by individual jobs,
but if you ask the main Jenkins jenkins.log file (generated by the Jenkins server),
an error related to this was fixed on Apr-2015 -
see here:

You can also learn more about registering with Jenkins here:

+3
source

This is the default Jenkins feature, and you do not need a plugin to achieve what you need. Go to the job configuration page and check the box "Cancel old builds" (this is correct in the job description. Then select the log rotation as a strategy and specify "7" as the value "Days to save the assembly".

+1
source

All Articles