|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
_______________________________________________ logback-dev mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-dev

On of my coworkers solved this problem with the following:
// Author: [email protected]
@NoAutoStart
public class RollingOnStartupSizeAndTimeBasedFNATP<E> extends SizeAndTimeBasedFNATP<E> {
private final AtomicBoolean firstTime = new AtomicBoolean();
@Override
{ String maxFileSize = getMaxFileSize(); setMaxFileSize("1"); super.isTriggeringEvent(activeFile, event); setMaxFileSize(maxFileSize); return true; }public boolean isTriggeringEvent(File activeFile, final E event) {
if (firstTime.compareAndSet(false, true) && activeFile.length() > LogHeaderWriter.getHeaderLength())
return super.isTriggeringEvent(activeFile, event);
}
}
It seems to work properly, but maybe there's another/better option?