unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Sebastian Tennant" <sebyte@smolny.plus.com>
Cc: guile-user@gnu.org
Subject: Re: Error reporting
Date: Sun, 23 Nov 2008 11:48:23 +0000	[thread overview]
Message-ID: <49dd78620811230348t56cf2df6qe864d82310da1bd6@mail.gmail.com> (raw)
In-Reply-To: <3ahlmvpj.fsf@vps203.linuxvps.org>

2008/11/21 Sebastian Tennant <sebyte@smolny.plus.com>:
> 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




  parent reply	other threads:[~2008-11-23 11:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21  6:36 Error reporting Sebastian Tennant
2008-11-22 23:30 ` Jon Wilson
2008-11-23  6:18   ` Sebastian Tennant
2008-11-23 11:48 ` Neil Jerram [this message]
2008-11-23 12:29 ` Ludovic Courtès
2008-11-26 17:16   ` Sebastian Tennant
2008-12-01 22:34     ` Neil Jerram
2008-12-02  5:48       ` Sebastian Tennant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49dd78620811230348t56cf2df6qe864d82310da1bd6@mail.gmail.com \
    --to=neiljerram@googlemail.com \
    --cc=guile-user@gnu.org \
    --cc=sebyte@smolny.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).