[SERVER-7965] Add Year to Logging Timestamp Created: 17/Dec/12 Updated: 23/Feb/15 Resolved: 19/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.5.2 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Adam Comerford | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Implementation Details
The beginning of the Unix Epoch is formatted as follows in the three formats, assuming America/New_York for the time zone.
Original description Rather than the current:
Perhaps:
|
| Comments |
| Comment by Andy Schwerin [ 19/Aug/13 ] | ||||
|
Tools that expect that timestamp to be formatted in "ctime" format may need updating. | ||||
| Comment by auto [ 19/Aug/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||||
| Comment by auto [ 26/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: From the command line or config file, --logTimestampFormat=(ctime|iso8601-utc|iso8601-local). The beginning of the Unix Epoch is formatted as follows in the three formats, ctime: Wed Dec 31 19:00:00.000 The default remains the same as in prior versions, "ctime". | ||||
| Comment by auto [ 24/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||||
| Comment by auto [ 24/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: This includes manually constructing the timezone offset in ISO 8601 formatted | ||||
| Comment by Andy Schwerin [ 24/Jul/13 ] | ||||
|
Proposal: New command-line option for configuration:
The beginning of the Unix Epoch is formatted as follows in the three formats, assuming America/New_York for the time zone.
The last open decision is to choose an appropriate default. iso8601-local is appealing because it is reports time in host's time zone, but provides enough information to find the UTC time. The cost is an extra 4 bytes per log line over the iso8601-utc form. | ||||
| Comment by auto [ 24/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: . | ||||
| Comment by auto [ 24/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||||
| Comment by auto [ 24/Jul/13 ] | ||||
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}Message: | ||||
| Comment by Daniel Pasette (Inactive) [ 23/Jul/13 ] | ||||
|
Plan is to change default to ISO-8601 with option to use current format. | ||||
| Comment by Justin Case [ 27/May/13 ] | ||||
|
I would prefer an ISO 8601 timestamp. | ||||
| Comment by Thomas Rueckstiess [ 17/Feb/13 ] | ||||
|
The weekday name is redundant and could be replaced by the year. If we replace the first element (weekday name) with the year, we would also keep the number of space-separated tokens constant, causing minimal damage to existing log parsers that rely on the positions of certain tokens.
Another consideration: Use ISO 8601 and replace month names by month numbers to make log lines sortable by date. This could become useful for future log parsing tools.
|