Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-709

Debuglog timestamp does not contain micro/nanoseconds

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0-beta1, 1.4.0
    • Affects Version/s: 1.1.7
    • Component/s: None
    • None

      If you turn on the debug log, it's output is like:
      [2016-06-08T08:02:15+00:00] cluster: TRACE > ENTRY: mongoc_cluster_destroy():1643
      [2016-06-08T08:02:15+00:00] cluster: TRACE > EXIT: mongoc_cluster_destroy():1653

      This timestamp is a good start, but it would be useful (to debug timeout issues) to have the fractions of seconds display as well.

      Attached is a small patch I've used to fix this for myself, but it most likely doesn't pass any code-quality check as I haven't used c in a very long time. It adds usecs so the output of the debugtrace looks like this:
      [2016-06-08T07:56:29.957146] cluster: TRACE > ENTRY: mongoc_cluster_destroy():1643
      [2016-06-08T07:56:29.957163] cluster: TRACE > EXIT: mongoc_cluster_destroy():1653

            Assignee:
            derick Derick Rethans
            Reporter:
            kees Kees Hoekzema
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: