Enable immediate flush on RollingFileAppender when buffered i/o is not enabled.
@@ -153,8 +153,8 @@ public final class RollingFileAppender extends AbstractOutputStreamAppender<Roll
manager.initialize();
return new RollingFileAppender(getName(), layout, getFilter(), manager, fileName, filePattern,
- isIgnoreExceptions(), isImmediateFlush(), advertise ? getConfiguration().getAdvertiser() : null,
- getPropertyArray());
+ isIgnoreExceptions(), !isBufferedIo || isImmediateFlush(),
+ advertise ? getConfiguration().getAdvertiser() : null, getPropertyArray());
}
public String getAdvertiseUri() {
