Skip to main content
gamedev.net
🔒 Locked

Onscreen Error Logger?

Started by valles Sep 10, 2006 at 11:52 PM 2 replies 1k views
Original Post
valles
valles
I currently have an error log that saves to a file. I would prefer an onscreen error log, but the translate and dispatch of windows messages is handled outside of the DXUTRender3dEnvironment(). So my program crashes in the render, and all of the error logs have not been published. So, is there a way to have my changes to the edit skip the queue and go directly to the dialog box and refresh? - valles
blaze02
blaze02
I try to stay away from the DXUT code, so I have no idea how to do what you want. If I were you, I'd just write everything to a file. Especially for errors that you will quickly fix and never see again (hopefully). I would just create a file, write the error to it, and close it every time I got an error. You could change the filename to keep all the errors, or just overwrite the file each error and view the last error.

Hope that helps.
MatrixCubed
MatrixCubed
Agreed. Any decent text editor (Kate/whatever Gnome provides, UltraEdit, BBEdit, jEdit) will usually have a reload option to reload a logfile from disk if changes are detected, so writing your own such application functionality is kind of pointless anyways.
circlesoft
circlesoft
I generally use both: a runtime console (used to display logging and enter scripting commands) and a file saved to disk. It wasn't much work at all to implement the console (just draw a shaded quad and text), and is pretty useful. Also, with the disk file, it is important to flush the file writing after each log entry - otherwise, if the app crashes, you can lose the un-written logging entries.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.