On Wed, 14 Jul 2004, Bob Jamison wrote:
But it would be nice to redirect the messages elsewhere...
I have been mentioning a "Debug console" window as a desirable thing, for a while now. Messages via Stdout/Stderr might be somewhat annoying on Unices, but they can really turn someone away if a DOS window appears on Windows.
In another project I once worked on, we had a somewhat similar problem of dealing with debug/log output. The approach we used was to replace all the prints to stderr with an error message routine that could be redirected at runtime to go to stderr, a logfile, a network socket, or an ncurses display.
We could use a similar approach, except with a Gtk widget (like a console window) instead of an ncurses thingee.
The error messaging routine included more info than just the error message, such as the file/function name, level of importance (for verbosity control), etc.
The display widget allowed for selecting which "category" of messages to look at. This essentially just did a grep for messages matching the category string. This way, one could turn up debug output very high, but be able to focus on the output from one subsystem.
Anyway, an idea to think about. Probably be a lot of work to convert all the g_warnings() over to a new function, but who knows.
Bryce