Re: [PATCH] Friendly log messages for CLI server
| From: | Derick Rethans | Date: | Wed, 29 Jun 2011 10:45:01 +0000 |
| Subject: | Re: [PATCH] Friendly log messages for CLI server | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53649@lists.php.net to get a copy of this message | ||
On Wed, 29 Jun 2011, Jérôme Loyet wrote:
> 2011/6/29 Johannes Schlüter <johannes@schlueters.de>:
> > 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).
> >
>
> I agree with johannes. Color should be an option, all term does not
> handle them correctly. Also, color control sequences are just killing
> a log file.
That's why the patch first checks whether stdout is actually a tty, so
your log file will not have ansi control characters.
Derick