Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53700 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8044 invoked from network); 30 Jun 2011 10:54:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2011 10:54:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:37747] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/F4-10401-3E55C0E4 for ; Thu, 30 Jun 2011 06:54:28 -0400 Received: from [192.168.2.230] (ppp-93-104-63-76.dynamic.mnet-online.de [93.104.63.76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 9977774590; Thu, 30 Jun 2011 12:54:24 +0200 (CEST) To: David =?ISO-8859-1?Q?Z=FClke?= Cc: Arpad Ray , internals@lists.php.net In-Reply-To: References: <1309303149.2331.119.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Thu, 30 Jun 2011 12:54:20 +0200 Message-ID: <1309431260.2984.2.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2011-06-30 at 07:08 +0200, David Zülke wrote: > On 29.06.2011, at 01:19, Johannes Schlüter wrote: > > > On Tue, 2011-06-28 at 23:37 +0100, Arpad Ray wrote: > >> - Colours messages according to their response code (success=green, > >> client error=yellow, server error=red) > > > > I would prefer if this would be an ini option (if (cli_web_server.color > > && isatty) color = true) default can be on, but I've seen cases where > > such magic failed and created hard-to use results (due to control > > sequences in log files or such). > > The code could detect if it's outputting to a TTY or not and only use > color codes if the output isn't redirected somewhere else. It *is* checking this. And I showed an example (script(1)) where the environment pretends to be a TTY and isn't. My suggestion was to add an ini option in addition to the check. johannes