A feature that has long been requested.
To send your debugging output to a file, do this.

db>/tmp/h

To go back to stdout,

db>

When sent to a file, messages at level 1 and 2 are still sent to stdout.
Otherwise you wouldn't be able to see what you're doing so to speak.

Debug file is limited to 10 megs.
I wanted some kind of cap on it, because sometimes I am using
debug information to track down an infinite loop.

I use setlinebuf to make sure the log is up to date,
even if the program seg faults.
(This has to be tweaked for windows, no such function.)

This was somewhat tedious, but made easier by the internationalization
of all the messages.
In other words, all the mainstream output vectors through eb_puts(),
so I just add some code in there to tee it over to the debug file if present.
That takes care of the regular output, then the input which is just in one 
place,
then debugPrint(), and a few more weird situations, and we're there.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to