[logback-user] SizeAndTimeBasedArchiveRemover: Unexpected periodsElapsed value 0
gaurav419 at gmail.com
Thu Nov 8 16:52:16 CET 2012
Forgot to mention, my logback.xml says:
and rollover happened appropriately for the first time (so I have
test.2012-11-08.202336641.log created) and the mentioned error keeps coming
continuously thereafter attempting to rename test.log again to
On Thu, Nov 8, 2012 at 9:18 PM, Gaurav Kumar <gaurav419 at gmail.com> wrote:
> I am seeing the following error when rollover happens (this keeps coming
> continuously on stdout/err):
> *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].
> 20:25:38,351 |-WARN in
> ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover at 6d3374- Unexpected periodsElapsed value 0
> I am using RollingFileAppender with TimeBasedRollingPolicy and trigger is
> timeBasedFileNamingAndTriggeringPolicy with
> class="MyOwnSizeAndTimeBasedFNATP" defined as:
> public class MyOwnSizeAndTimeBasedFNATP<E> extends SizeAndTimeBasedFNATP<E>
> private final AtomicBoolean trigger = new AtomicBoolean();
> public boolean isTriggeringEvent(final File activeFile, final E event)
> if (trigger.compareAndSet(false, true) && activeFile.length() > 0)
> String maxFileSize = getMaxFileSize();
> super.isTriggeringEvent(activeFile, event);
> return true;
> return super.isTriggeringEvent(activeFile, event);
> 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.
> Any pointers please?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user