Re: [PATCH] Friendly log messages for CLI server

From: Date: Thu, 30 Jun 2011 12:47:04 +0000
Subject: Re: [PATCH] Friendly log messages for CLI server
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-53703@lists.php.net to get a copy of this message
agreed, it should be optional and off by default. PHP never had such feature either. 2011/6/30 Johannes Schlüter <johannes@schlueters.de>: > 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 > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#53703) next »