<div dir="ltr">Hi,<br>I am seeing the following error when rollover happens (this keeps coming continuously on stdout/err):<br><br><b>20:25:38,351 |-WARN in c.q.l.co.rolling.helper.RenameUtil - Failed to rename file [D:\test.log] to [D:\test.2012-11-08.202336641.log].<br>
...<br>20:25:38,351 |-WARN in ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover@6d3374 - Unexpected periodsElapsed value 0<br></b><br><br>I am using RollingFileAppender with TimeBasedRollingPolicy and trigger is timeBasedFileNamingAndTriggeringPolicy with class="MyOwnSizeAndTimeBasedFNATP" defined as:<br>
<br>@NoAutoStart<br>public class MyOwnSizeAndTimeBasedFNATP<E> extends SizeAndTimeBasedFNATP<E><br>{<br> private final AtomicBoolean trigger = new AtomicBoolean();<br><br> @Override<br> public boolean isTriggeringEvent(final File activeFile, final E event) {<br>
if (trigger.compareAndSet(false, true) && activeFile.length() > 0) {<br> String maxFileSize = getMaxFileSize();<br> setMaxFileSize("1");<br> super.isTriggeringEvent(activeFile, event);<br>
setMaxFileSize(maxFileSize);<br> return true;<br> }<br><br> return super.isTriggeringEvent(activeFile, event);<br> }<br><br><br>Any suggestions on what could have gone wrong here? I tried to dig deeper into the logback code to identify the problem. I feel I am somehow entering RollingFileAppender's subAppend() multiple times or violating the synchronised behaviour as mentioned in the comment in the code.<br>
<br>Any pointers please?<br><br>Thanks!<br><br><br></div>