Bill Miller commented on New Feature LOGBACK-204

On of my coworkers solved this problem with the following:

// Author: ksun@opentext.com
@NoAutoStart
public class RollingOnStartupSizeAndTimeBasedFNATP<E> extends SizeAndTimeBasedFNATP<E> {
private final AtomicBoolean firstTime = new AtomicBoolean();

@Override
public boolean isTriggeringEvent(File activeFile, final E event) {
if (firstTime.compareAndSet(false, true) && activeFile.length() > LogHeaderWriter.getHeaderLength())

{ String maxFileSize = getMaxFileSize(); setMaxFileSize("1"); super.isTriggeringEvent(activeFile, event); setMaxFileSize(maxFileSize); return true; }

return super.isTriggeringEvent(activeFile, event);
}
}

It seems to work properly, but maybe there's another/better option?

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