2008/11/21 Sebastian Tennant <[EMAIL PROTECTED]>: > Hi all, > > I very much doubt it's possible, but is there any way of getting Guile > to include a timestamp in it's error reporting? > > For example: > > guile> foo > 2008-11-20 23:17:11 ERROR: Unbound variable: foo > 2008-11-20 23:17:11 ABORT: (unbound-variable)
How about a soft output port that automatically adds a timestamp when something is written to it? You could implement a basic version of this very quickly - outputting a timestamp whenever the port's display proc is called. But that might generate more timestamps than are useful, and not always at line breaks. So you could then get more sophisticated by - scanning what is being output for a linebreak, and inserting the timestamp there - only inserting a timestamp if it has changed since the last one that was output. Then your web server would create one of these ports, and use it as its error port. Regards, Neil
