Closed matejk closed 4 months ago
Note that there's also a difference in line endings on Windows. FileOutputStream
always uses \n
only. The Windows-specific LogFile
also properly translates \n
to \r\n
. So this will break things on Windows.
Thanks, @obiltschnig. I missed that detail.
I replaced hardcoded '\n'
with POCO_DEFAULT_NEWLINE_CHARS
.
While I am at it:
Shall Windows line endings be converted to Unix in the same manner when writing to a log file?
4431.
FileOutputStream
implements platform specific streams that are used byLogFile
. There is no need to have additional platform specific implementations.The only missing functionality in
FileStream
was flushing to disk.Flushing on Posix vs Win32 was semantically different (iostream flush vs file system flush and was resolved in #4429). Flush option now means file system flush.
Since file system flush has major impact on write performance, the default flush setting is now false.