log4net version: 1.2.9-beta
Platform: Windows CE 5.0 / NetCF 1.0

Unfortunately, the FileStream.Flush method in the CompactFramework (used by
the FileAppenders) only flushes the stream to the OS's file buffers (via the
native fflush method). It does not flush the underlying OS's file buffers to
the actual media. You must call the native method:

    bool FlushFileBuffers(IntPtr handle)

to accomplish this. As such, setting ImmediateFlush to 'true' on the
CompactFramework does not accomplish the desired result of immediately
persisting logging events.

Thanks,
Chris

References:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceappdev5/
html/wce50lrffflush.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcedata5/ht
ml/wce50lrfflushfilebuffers.asp

Reply via email to