Open matejk opened 5 months ago
Logically, there should be only LogFile, because we have POSIX and WIN32 FileStream; performance may be the reason for the current state.
Some benchmarking would help to make the right decision, ie. whether it makes sense to introduce LogFile_POSIX
, instead of having just one LogFile
.
As for flush/sync, those should be two separate properties and they should have strategies with reasonable defaults.
LogFile
has different implementations for Windows using Win32 API and STD for other platforms wherePoco::FileOutputStream
is used.Poco::FileOutputStream
has Windows and Posix implementations.LogFile
callsFlushFileBuffers
on Windows which forcefully flushes buffers to disk. Posix equivalent would befsync
.fsync
(orflushToDisk
) shall be added toFileStream_POSIX
andFileStream_WIN32
.LogFile
shall be unified to useFileOutputStream
Related: #2443, #4429.