[ 
https://issues.apache.org/jira/browse/NIFI-2203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17290736#comment-17290736
 ] 

Jens M Kofoed commented on NIFI-2203:
-------------------------------------

The totalSizeCap attribute is working.

If you created it as an attribute in the <appender> and not inside the 
<rollingPolicy> 

<appender name="APP_FILE" 
class="ch.qos.logback.core.rolling.RollingFileAppender">
 <file>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app.log</file>
 <rollingPolicy 
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
 <!--
 For daily rollover, use 'app_%d.log'.
 For hourly rollover, use 'app_%d\{yyyy-MM-dd_HH}.log'.
 To GZIP rolled files, replace '.log' with '.log.gz'.
 To ZIP rolled files, replace '.log' with '.log.zip'.
 -->
 
<fileNamePattern>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app%d\{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
 <maxFileSize>100MB</maxFileSize>
 <!-- keep 30 log files worth of history -->
 <maxHistory>30</maxHistory>
 </rollingPolicy>
 <totalSizeCap>10GB</totalSizeCap>
 <immediateFlush>true</immediateFlush>
 <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
 <pattern>%date %level [%thread] %logger\{40} %msg%n</pattern>
 </encoder>
 </appender>

> Update logging to allow the use of the totalSizeCap proeprty
> ------------------------------------------------------------
>
>                 Key: NIFI-2203
>                 URL: https://issues.apache.org/jira/browse/NIFI-2203
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mark Bean
>            Priority: Major
>
> The lastest version of logback.qos.ch (1.1.7) supports the property 
> "totalSizeCap". This property can be used to limit the total size of archived 
> log files. Currently, the top level nifi pom.xml specifies version 1.1.3.
> Note: logback 1.1.4 and later require SLF4J version 1.7.16 or later.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to