Received: by taz.hyperreal.com (8.8.3/V2.0) id NAA03542; Sat, 4 Jan 1997 13:40:07 -0800 (PST) Received: from nora.pcug.co.uk by taz.hyperreal.com (8.8.3/V2.0) with SMTP id NAA03529; Sat, 4 Jan 1997 13:40:03 -0800 (PST) Received: from imdb.demon.co.uk by nora.pcug.co.uk id aa09853; 4 Jan 97 21:39 GMT Date: Sat, 4 Jan 1997 21:04:25 +0000 (GMT) From: Rob Hartill To: new-httpd@hyperreal.com Subject: Apache 1.2b4 and ScriptLog (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Looks like ScriptLog needs better documentation.. acked. ---------- Forwarded message ---------- Date: Sat, 4 Jan 1997 20:35:46 +0000 (GMT) From: WWW server manager To: apache-bugs@apache.org Subject: Apache 1.2b4 and ScriptLog I just tried using the new ScriptLog directive with Apache 1.2b4, and tripped over a divergence between reality and my expectations. I'd edited a perl CGI script to write debugging output to stderr, and added a ScriptLog directive to the configuration files, but "nothing happened". The log file didn't get created (and when I created it manually, nothing got written to it). I eventually tried writing to stdout before the HTTP headers, and that did result in output to the log, confirming that the log was configured properly and would be used when the circumstances were appropriate. It had seemed so obvious that script stderr would be copied to the log that I hadn't gone searching for confirmation, though the documentation says nothing either way... Except that the file is described as "the CGI script error logfile", which to me reads as though it's where stderr will be directed! A quick look through mod_cgi.c suggests that ScriptLog is used only for things which apache deems to be errors - not, as I'd assumed, as a destination for stderr to simplify debugging. Wouldit be possible to copy script stderr output unconditionally to ScriptLog, i.e. treating any output to stderr as a reason to log the script details including stderr (but not treating it as an error unless there actually was an error)? Looking at the source also prompted another thought - it looks as though stderr output from the script is not read until the script terminates or an error is detected. Depending on how much buffering is provided by the system, couldn't this result in a script which (perhaps accidentally) produced "too much" stderr output hanging mysteriously, waiting for the parent process to read some of the pending data...? John Line -- University of Cambridge WWW manager account (usually John Line) Send general WWW-related enquiries to webmaster@ucs.cam.ac.uk