|  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: 2015-03-04 17:22 UTC
Avg. Score:2.5 ± 0.5
Reproduced:0 of 1 (0.0%)
From: Assigned: moriyoshi (profile)
Status: Closed Package: Built-in web server
PHP Version: trunk-SVN-2011-07-02 (SVN) OS: N/A
Private report: No CVE-ID: None
 [2011-07-01 21:13 UTC]
- 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:

Actual result:


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


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-01 21:20 UTC] arraypad at gmail dot com

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]
-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]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: moriyoshi
 [2011-07-19 13:47 UTC]
Automatic comment from SVN on behalf of moriyoshi
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]
Automatic comment from SVN on behalf of arpad
Log: add friendly log messages (req #55109)
 [2015-03-04 17:22 UTC]
-Status: Assigned +Status: Closed
 [2015-03-04 17:22 UTC]
already been implemented
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 03:01:29 2024 UTC