|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66110 Add possibility to use millisecond precision timestamps in logging
Submitted: 2013-11-18 07:01 UTC Modified: -
From: andreas dot lindemann at de dot bp dot com Assigned:
Status: Open Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
28 + 36 = ?
Subscribe to this entry?

 [2013-11-18 07:01 UTC] andreas dot lindemann at de dot bp dot com
For high volume sites, it would be nice to be able to use a millisecond precision timestamp for the php-fpm access log and the PHP error log, so requests can show up in the correct order in logfiles (i.e. when using logstash to centralize logging).

Otherwise, even with only several dozen requests per second, you'll end up with requests showing up in the wrong order if you have multiple webservers logging to a central place.

Unfortunately, php-fpm access log only accepts a strftime() format and there's no way to specify that kind of precision there. It would be useful just to have an additional access.format variable to output a unix timestamp with millisecond precision, like "1384757986.861".

Same would be nice for the general php error log.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 18:01:25 2019 UTC