Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-07-01 Thread Arpad Ray
Hi, There's now a request for this: https://bugs.php.net/bug.php?id=55109 Colours are now toggled by the ini setting cli_server.color. I'm still looking into means of excluding the more deceptively incapable terminals but I will support having colours on by default anyway. Regards, Arpad --

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Christopher Jones
On 06/30/2011 12:04 PM, Hannes Magnusson wrote: On Thu, Jun 30, 2011 at 20:14, Lars Bo Rasmussen wrote: Instead of adding it as a php ini option, please consider adding this as a parameter to the php-cli executable as this might be something you would want to enable/disable quickly per instan

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Hannes Magnusson
On Thu, Jun 30, 2011 at 20:14, Lars Bo Rasmussen wrote: > Instead of adding it as a php ini option, please consider adding this as a > parameter to the php-cli executable as this might be something you would > want to enable/disable quickly per instance. This would also make the > coloring output

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Lars Bo Rasmussen
Instead of adding it as a php ini option, please consider adding this as a parameter to the php-cli executable as this might be something you would want to enable/disable quickly per instance. This would also make the coloring output more attractive to use instead of having to edit the ini file eve

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Pierre Joye
agreed, it should be optional and off by default. PHP never had such feature either. 2011/6/30 Johannes Schlüter : > 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: >> >> - Colour

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Richard Quadling
On 30 June 2011 12:24, Derick Rethans wrote: > On Thu, 30 Jun 2011, Johannes Schlüter wrote: > >> 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

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Derick Rethans
On Thu, 30 Jun 2011, Johannes Schlüter wrote: > 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, > >

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-30 Thread Johannes Schlüter
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

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread David Zülke
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 > &&

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Pierre Joye
hi, Good idea :) However I would prefer to have that enabled optionally. CLI is widely used for automated tasks with logs created using std* redirects. I would not like to have the color escape codes in these logs. Also please open a FR at bugs.php.net and attach the patch(es) to it, thanks! Ch

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Johannes Schlüter
On Wed, 2011-06-29 at 11:45 +0100, Derick Rethans wrote: > That's why the patch first checks whether stdout is actually a tty, so > your log file will not have ansi control characters. While that check is not always the best/good thing. For instance if you're using script(1) to log a terminal ses

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-29 Thread Derick Rethans
On Wed, 29 Jun 2011, Jérôme Loyet wrote: > 2011/6/29 Johannes Schlüter : > > 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 optio

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-28 Thread Christopher Jones
On 06/28/2011 04:19 PM, 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)

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-28 Thread Jérôme Loyet
2011/6/29 Johannes Schlüter : > 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)

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-28 Thread Johannes Schlüter
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

Re: [PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-28 Thread Ferenc Kovacs
On Wed, Jun 29, 2011 at 12:37 AM, Arpad Ray wrote: > Hi, > > This little patch makes the following changes to the CLI web server's > console logging: > - Compacts messages to one line, so a 404 doesn't occupy three lines. > - Includes the response status code > - Colours messages according to thei

[PHP-DEV] [PATCH] Friendly log messages for CLI server

2011-06-28 Thread Arpad Ray
Hi, This little patch makes the following changes to the CLI web server's console logging: - Compacts messages to one line, so a 404 doesn't occupy three lines. - Includes the response status code - Colours messages according to their response code (success=green, client error=yellow, server error