Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7965

Add Year to Logging Timestamp

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.5.2
    • Component/s: Logging
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      Implementation Details
      New command-line option for configuration:

      --logTimestampFormat=(ctime|iso8601-utc|iso8601-local)

      The beginning of the Unix Epoch is formatted as follows in the three formats, assuming America/New_York for the time zone.

      ctime:         Wed Dec 31 19:00:00.000
      iso8601-utc:   1970-01-01T00:00:00.000Z
      iso8601-local: 1969-12-31T19:00:00.000+0500

      Original description
      Log parsing with date ranges can be tricky without a year in the timestamp by default, especially near the end/start of the year.

      Rather than the current:

      Thu Dec 13 16:39:15 [log message]

      Perhaps:

      Thu Dec 13 2012 16:39:15 [log message]

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              schwerin Andy Schwerin
              Reporter:
              adam@comerford.net Adam Comerford
              Participants:
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: