I'm a developer. One of my application is based on Jdk8, groovy 2.4 as language and on the top of Spring Framework. As a logger I'm using 'logback' dependencies. (group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.8'). Basically, RollingFileAppender is working fine for me, But currently.
For an example, Suppose the specific logger function is invoked at 2018-05-16 11:08:50, A record entered into error.log and no rolling file is created. Well, when the next execution occurs approximately after 6 minutes at 2018-05-16 11:15:05, A fresh file is created error.2018-05-16-11-
<appender name="ERROR_LOG"
class="ch.qos.logback.core.rolling.RollingFileAppender" >
<file>logs/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy" >
<fileNamePattern>logs/error_log /error.%d{yyyy-MM-dd-HH-mm}. log
</fileNamePattern>
<maxHistory>10</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}\t%msg%n</pattern>
</encoder>
</appender>
Through my investigation,
The purpose is partially resolved by removing the below property.<file>logs/error.log</file>