Original Post
Until recently, I was using a simple error handling class which fopened a file when my application started, fprinted to it during runtime, and fclosed it upon exit. Only inexplicably, sometimes upon exit the file would appear to be empty. The rest of the program seems to run fine. What could cause that? Another problem with doing things that way, was if something stupid happened during the program, the whole thing would crash, and windoze would end the program and the destructor of the error handler wouldn''t be called, ie. the file would not be fclosed.
So what I am doing now is clearing the file upon startup, and then append opening and closing the file before and after every call to the error handler. This seems to have solved the problem I stated above. However - just how stupid is? I''m not in the habit of calling the logger/errorhandler every frame, just on things like bitmap loading and directdraw errors etc., so is this that stupid? It at least always preserves the contents of the file. How do you people log errors?
r.
"The mere thought hadn''t even begun to speculate about the slightest possibility of traversing the eternal wasteland that is my mind..."