java - logback RollingFileAppender not rolling files -


i have logback config having rollingfileappender appender sizeandtimebasedrollingpolicy. however, seems whenever application runs logback doesn't roll files , keeps appending same file on , on again.

my application executes little time not more few seconds. thought issue used cleanhistoryonstart option not working. please me.

here's config

<?xml version="1.0" encoding="utf-8"?> <configuration scan="true" scanperiod="20 seconds">   <appender name="consoleappender" class="ch.qos.logback.core.consoleappender">     <encoder>       <pattern>[%d{yyyy-mm-dd hh:mm:ss}] :: %-5p :: %-10class{0}:%l - %m%n</pattern>     </encoder>   </appender>   <appender name="processlogfileappender"  class="ch.qos.logback.core.rolling.rollingfileappender">         <append>true</append>         <file>/home/elkapp/etl_logs/etllogsgenerator/logs/etllogsgenerator.log</file>         <rollingpolicy class="ch.qos.logback.core.rolling.sizeandtimebasedrollingpolicy">                 <filenamepattern>/home/elkapp/etl_logs/etllogsgenerator/logs/etllogsgenerator-%d{yyyy-mm-dd}.%i.log</filenamepattern>                 <maxhistory>30</maxhistory>                 <maxfilesize>10mb</maxfilesize>                 <totalsizecap>500mb</totalsizecap>                 <cleanhistoryonstart>true</cleanhistoryonstart>         </rollingpolicy>         <encoder>                 <pattern>[%d{yyyy-mm-dd hh:mm:ss}] :: %-5p :: %-10class{0}:%l - %m%n            </pattern>         </encoder>   </appender>    <logger name="com.ibm.etllogsgenerator" level="info">     <appender-ref ref="processlogfileappender"/>     <!--appender-ref ref="consoleappender"/-->   </logger>  </configuration> 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -