From: James S. <jam...@op...> - 2007-03-18 07:43:13
|
On Sun, 2007-03-18 at 12:45 +1100, Brian Bruinewoud wrote: > Greg Chicares wrote: > > >On 2007-3-17 0:53 UTC, Brian Bruinewoud wrote: > > > > > >>Greg Chicares wrote: > >> > >> > >[...] > >>Print statements always finish at a particular function, but the last > >>batch of output may not have been properly flushed to the disk... > >> > >> > > > >Good point. There's some msw function that's supposed to > >flush all buffers to disk...let's see...okay, it's > >_flushall(), but you have to link 'Commode.obj', which > >I guess requires ms tools. > > > > > > > An 'easier' way is to close the file everytime you finish writing to it. > A lot slower, but 100% guaranteed (unless you crash the OS itself). > I'll change the tracing code to do this. A much nicer way to capture debuggery strings I find is to use the ol' OutputDebugString(). It ensures that the a string is written to the debugger before returning, and if there is no debugger listening it incures little overhead to leave the debuggery in. I still usually #ifdef DEBUG ... #endif to build a release version. Regards, James. |