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

Add Year to Logging Timestamp

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.2.2
    • 2.5.2
    • Logging
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: