I have a simple question for using logback. I am using Logback for my application with RollingFileAppender. It works well but when I restart my application, It won't append existing file but gone somewhere.
Here is xml file for logback configuration for my application.
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- hourly rollover -->
<fileNamePattern>/home/log/logFile.%d{yyyy-MM-dd}.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 hours' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%-4r [%thread] %X{clientIP} %d{HH:mm:ss.SSS} [%p] [%thread@%C{1}:%L] - %m%n</pattern>
</encoder>
</appender>
For example, when I first start application, It creates a log file in accordance with configuration above.
-rw-r--r-- 1 root root 6926 Nov 7 10:19 logFile.2015-11-07.log
But if I stop application and restart, I expect log to be appended on above file but It won't ( I even couldn't find where this missing log exist. )
Thanks in advance.