Best way of logging errors?

Started by
10 comments, last by Moe 21 years, 8 months ago
quote:Original post by shurcool
flush does exactly that.

I don''t think the ''flush'' really do an actual write to the disk. The OS cached it all and decides when to do it. Unless you are calling a low-level flush (is it _commit()?)... I guess.
"after many years of singularity, i'm still searching on the event horizon"
Advertisement
flush writes to the file the contents of the stream. So yes, if the program were to abnormally terminate without closing the stream, you''d still have your log data. However, in the fflush() documentation, it says you can link with COMMODE.OBJ to skip the operating system''s buffering and write directly to the file without the flush.

This topic is closed to new replies.

Advertisement