first of all, here is my configuration file, I'm copy-pasting it as we have (is almost identical to the one from all applications we develop now):
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<contextName>TST-LOGBACK</contextName>
<jmxConfigurator/>
<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
<Marker>PROFILER</Marker>
<OnMatch>ACCEPT</OnMatch>
</turboFilter>
<property name="AUDIT_LOG_DIR" value="/export/home/oracle/TESTS/tst" />
<property name="AUDIT_LOG_FILE" value="tst-logback-audit.log" />
<property name="PERF_LOG_DIR" value="/export/home/oracle/TESTS/tst" />
<property name="PERF_LOG_FILE" value="tst-logback-perf.log" />
<property name="LOG_DIR" value="/export/home/oracle/TESTS/tst" />
<property name="LOG_FILE" value="tst-logback.log" />
<property name="LOG_FILE_ROLLING" value="tst-logback" />
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<prudent>true</prudent>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover with ${LOG_DIR}/${LOG_FILE_ROLLING}_%d{yyyy-MM-dd}.log -->
<!-- hourly rollover with ${LOG_DIR}/${LOG_FILE_ROLLING}_%d{yyyy-MM-dd_HH}.log -->
<!-- every minute rollover with ${LOG_DIR}/${LOG_FILE_ROLLING}_%d{yyyy-MM-dd_HH_mm}.log -->
<fileNamePattern>${LOG_DIR}/${LOG_FILE_ROLLING}_%d{yyyy-MM-dd_HH}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>48</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
</encoder>
</appender>
<appender name="AUDIT_FILE" class="ch.qos.logback.core.FileAppender">
<file>${AUDIT_LOG_DIR}/${AUDIT_LOG_FILE}</file>
<encoder>
<pattern>%date %level %logger{10} %msg%n</pattern>
</encoder>
</appender>
<appender name="PERF_FILE" class="ch.qos.logback.core.FileAppender">
<file>${PERF_LOG_DIR}/${PERF_LOG_FILE}</file>
<encoder>
<pattern>%date [%thread] %logger{10} %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date %level [%file:%line] %msg</pattern>
</encoder>
</appender>
<logger name="com.oracle.sk.tst" level="trace" additivity="false">
<appender-ref ref="FILE" />
</logger>
<logger name="com.oracle.sk.tst.logback.TestLogbackServlet" level="info" additivity="false">
<appender-ref ref="FILE" />
</logger>
<logger name="AUDITOR" level="trace" additivity="false">
<appender-ref ref="AUDIT_FILE" />
</logger>
<logger name="PROFILER" level="debug" additivity="false">
<appender-ref ref="PERF_FILE" />
</logger>
<root level="OFF">
<appender-ref ref="FILE" />
</root>
</configuration>
The prudent flag is there because I had troubles with truncating log files by our test people. They use "cat /dev/null/ > tst-logback_2013-04-17_10.log" to clear the log when they start testing. Without "prudent", application was not able to recover from it and was not logging anymore.
Maybe you want to look at complete testing project I use for solving this issue. I try to attach it to this email (don't know if attachments are allowed for this mailing list). And if you wish I can provide you with small (~2 min, ~13MB, FLV) video demostrating the behavior.
I did further testing and found one thing - after stopping and starting the app it was not able to recover even after rollover (on my dev machine with the testing project). The report from testing team says that they've seen it recovers when the new log file was rolled out, however now no one can remember if really :-) So I consider this as "not, it didn't recover" - at least I'm not able to prove that.
So after all, when I stop/start the app, it will stop logging...
Thank you for your help, I really appreciate it.
P.S.: BTW, even it has no impact to this issue, just for interest's sake, I think I found why I had lc.reset() in my code - in documentation, the example uses stop(), however the text above mentions reset().