The Jenkins plugin logs are rotating very quickly. The log file, and those stored in the archived sub folder, are rolling over every hour. How can we increase the number of logs kept and/or the size of the logs?
Continuous Delivery Director 8.x
At this time, this cannot be configured via the settings.properties file as described in the Working with Log Files product documentation.
If changing the log file size or rotation is absolutely necessary then these settings can be found in: <tomcat_home>/webapps/<plugin-name-folder>/
Note: Tomcat will need to be stopped and started after making changes to the plugin's logback.xml.
logback.xml example:
In <tomcat_home>/webapps/cdd-jenkins-plugin/WEB-INF/classes/logback.xml, the minIndex, maxIndex and maxFileSize properties are shown below:
<appender name="FILE-LOG"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/cdd_jenkins_plugin.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>${LOG_HOME}/archived/cdd_jenkins_plugin.%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>2</maxIndex>
</rollingPolicy>
<triggeringPolicy
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>100MB</maxFileSize>
</triggeringPolicy >
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} [jenkins] [%thread] [%X{tenantId}] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
</appender>