php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #55109 Friendly log messages
Submitted: 2011-07-01 21:13 UTC Modified: 2011-07-03 09:27 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: arpad@php.net Assigned: moriyoshi
Status: Assigned Package: Built-in web server
PHP Version: trunk-SVN-2011-07-02 (SVN) OS: N/A
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-07-01 21:13 UTC] arpad@php.net
Description:
------------
- 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=red)
- Appends the error message when there's a fatal PHP error

Test script:
---------------
...

Expected result:
----------------
http://spellign.com/patches/cli-after.png

Actual result:
--------------
http://spellign.com/patches/cli-before.png

Patches

php-trunk-cli-server-colors3 (last revision 2011-07-02 15:29 UTC) by arraypad at gmail dot com)
php-trunk-cli-server-colors2 (last revision 2011-07-02 01:16 UTC) by arraypad at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-01 21:20 UTC] arraypad at gmail dot com
Discussion: http://marc.info/?l=php-internals&m=130930069207940&w=2

NB. Patch is not ready to be applied yet - still looking into means of excluding apparently compatible (but not) terminals.
 [2011-07-01 22:46 UTC] sixd@php.net
-Package: CGI/CLI related +Package: Built-in web server
 [2011-07-02 11:35 UTC] arraypad at gmail dot com
Added value of On to php.ini-development and php.ini-production, and changed the default value to Off (so php -n -S ... doesn't use the colours.)

I haven't found a better way of checking the terminal, so I think this patch is ready.
 [2011-07-03 09:27 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: moriyoshi
 [2011-07-19 13:47 UTC] moriyoshi@php.net
Automatic comment from SVN on behalf of moriyoshi
Revision: http://svn.php.net/viewvc/?view=revision&revision=313441
Log: - Print HTTP method as well in the log.
- Print response code also when the request is processed by a script.
- Those changes partly closes #55109.
 [2011-08-29 21:59 UTC] arpad@php.net
Automatic comment from SVN on behalf of arpad
Revision: http://svn.php.net/viewvc/?view=revision&revision=315748
Log: add friendly log messages (req #55109)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 05:03:21 2014 UTC