Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19204 invoked from network); 30 Jun 2011 12:32:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2011 12:32:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qy0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:52406] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/46-10401-1FC6C0E4 for ; Thu, 30 Jun 2011 08:32:49 -0400 Received: by qyg14 with SMTP id 14so14007qyg.8 for ; Thu, 30 Jun 2011 05:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=BXMlB6CkcN/bLZHHcnd9/tEU8FRldIuNu70k71OR1AU=; b=kjNEfC224Chpjqzy82mqzCaUPD6fG3VpX0uI2nPdGbM/8oU/OaTwWCdLhxJ7uFs/6K IXJ050Ev0w9S723Nz+DsRiS+H1F6/6JjkXOHtsSNeOE+NtHGKUlZrYqarkcWgKEF9HP+ UDa4UOQSnElc4KmJSEzxqHCbTAySqdt84Z0L8= Received: by 10.229.61.94 with SMTP id s30mr1495568qch.86.1309437138283; Thu, 30 Jun 2011 05:32:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.215.72 with HTTP; Thu, 30 Jun 2011 05:31:58 -0700 (PDT) Reply-To: RQuadling@GMail.com In-Reply-To: References: <1309303149.2331.119.camel@guybrush> <1309431260.2984.2.camel@guybrush> Date: Thu, 30 Jun 2011 13:31:58 +0100 Message-ID: To: Derick Rethans Cc: =?UTF-8?Q?Johannes_Schl=C3=BCter?= , =?UTF-8?B?RGF2aWQgWsO8bGtl?= , Arpad Ray , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server From: rquadling@gmail.com (Richard Quadling) On 30 June 2011 12:24, Derick Rethans wrote: > On Thu, 30 Jun 2011, Johannes Schl=C3=BCter wrote: > >> On Thu, 2011-06-30 at 07:08 +0200, David Z=C3=BClke wrote: >> > On 29.06.2011, at 01:19, Johannes Schl=C3=BCter wrote: >> > >> > > On Tue, 2011-06-28 at 23:37 +0100, Arpad Ray wrote: >> > >> - Colours messages according to their response code (success=3Dgree= n, >> > >> client error=3Dyellow, server error=3Dred) >> > > >> > > I would prefer if this would be an ini option (if (cli_web_server.co= lor >> > > && isatty) color =3D true) default can be on, but I've seen cases wh= ere >> > > 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. > > I'm fine with that, but let's leave it set to 1 by default? People with > complex requirements can then turn it off if they want to. > > regards, > Derick > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > In Windows, there is no default colouring support at the console, so it would make sense if it was off by default. I use a tool called ANSICon which provides the colouring support (http://en.wikipedia.org/wiki/ANSI_escape_code#Support and source+bins at http://adoxa.110mb.com/ansicon/). So, for me turning it on would work for me. Richard. --=20 Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea