From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Neil Jerram" Newsgroups: gmane.lisp.guile.user Subject: Re: Error reporting Date: Sun, 23 Nov 2008 11:48:23 +0000 Message-ID: <49dd78620811230348t56cf2df6qe864d82310da1bd6@mail.gmail.com> References: <3ahlmvpj.fsf@vps203.linuxvps.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227440919 5205 80.91.229.12 (23 Nov 2008 11:48:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 11:48:39 +0000 (UTC) Cc: guile-user@gnu.org To: "Sebastian Tennant" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Nov 23 12:49:41 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4DTB-0004EH-Bv for guile-user@m.gmane.org; Sun, 23 Nov 2008 12:49:41 +0100 Original-Received: from localhost ([127.0.0.1]:37668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4DS1-0000ha-TJ for guile-user@m.gmane.org; Sun, 23 Nov 2008 06:48:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4DRy-0000hV-AB for guile-user@gnu.org; Sun, 23 Nov 2008 06:48:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4DRw-0000hJ-R9 for guile-user@gnu.org; Sun, 23 Nov 2008 06:48:26 -0500 Original-Received: from [199.232.76.173] (port=60390 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4DRw-0000hG-Om for guile-user@gnu.org; Sun, 23 Nov 2008 06:48:24 -0500 Original-Received: from rv-out-0708.google.com ([209.85.198.247]:26020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4DRw-0003Ee-Lh for guile-user@gnu.org; Sun, 23 Nov 2008 06:48:24 -0500 Original-Received: by rv-out-0708.google.com with SMTP id k29so1778691rvb.6 for ; Sun, 23 Nov 2008 03:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=r+JJAAmjTDjj878+/CXT5wBv/DIrpoIXXRnSn59dfp0=; b=hCDbBT+mxJ14Ur3On2hErMuTFM1tlxns7UO3+ejAH+OPeh0IM0xY9og+ibIkBaYN73 8MDfPff9+qh80IXDvBOuqFhcRPpJOItiXI06Kd72ZCYHIPfU03QKKRrDJ7CHPjBXyW3T zmF8zea5domMZ/QYoXskKzCD1ZDCC2ESjgITw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=RHOW9INzm6z2IDSXp/GD01LpzPV7sxFQQ0/DZWr78/eT5exEK3upC+w+vjMB9eJFzN vpMzqyHbVXq1oBA6M9frcafmEgOiaKoff1kOdkhxsdI7TTNQyrzMM2nKrObcmbgGSF9U erSejce4JUBlGjoob/9QhQCpeGfZRmzx+HpkI= Original-Received: by 10.141.136.4 with SMTP id o4mr1299981rvn.90.1227440903478; Sun, 23 Nov 2008 03:48:23 -0800 (PST) Original-Received: by 10.140.199.14 with HTTP; Sun, 23 Nov 2008 03:48:23 -0800 (PST) In-Reply-To: <3ahlmvpj.fsf@vps203.linuxvps.org> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6964 Archived-At: 2008/11/21 Sebastian Tennant : > 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