We did something similar:

public class MySiftAppender extends SiftingAppender {

	@Override
	protected void append(ILoggingEvent event) {
		super.append(event);
		eventMarksEndOfLife(event);
	}

	protected boolean eventMarksEndOfLife(ILoggingEvent event) {

		Marker marker = event.getMarker();
		if (marker == null)
			return false;

		boolean retValue = marker.contains(ClassicConstants.FINALIZE_SESSION_MARKER);

		if (retValue) {
			String discriminatingValue = getDiscriminator().getDiscriminatingValue(event);
			getAppenderTracker().stopAndRemoveNow(discriminatingValue);

		}

		return retValue;
	}

}

Did you test your code? I'm not sure if the issue is related to adding appenders to the stale list or closing the staled appenders.
Anyway as soon as the file is closed, that appender won't log anything else. Setting timeout to 0 looks odd. Do you want to log a single line every file? If that's the case you could just send the FINALIZE marker after every log, even by overriding all logging methods.

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