Merged
Conversation
The previous method (using ctime) has a number of issues that make it a bit weird to integrate with popular logging tools like ELK: 1. It appends a \n at the end of the timestamp which messes up date formatting for the unwary 2. It outputs time in the local timezone, without actually outputting the timezone... so logging tools like ELK will assume the date is in UTC, when actually it's GMT+2 or whatever... causing silly things like display logs in the future Easier method would be as proposed - simply output the timestamp in UNIX/EPOCH format. In this case it's millisecond epoch format - this is far more unambiguous for log parsers
Member
|
I don't like changing things like this, but restricting it to the json log makes it a bit better. |
Contributor
Author
|
Thanks!
Best Regards,
David Vassallo
*--------------------------------*
*@dave_vassallo <https://twitter.com/dave_vassallo>*
*http://blog.davidvassallo.me <http://blog.davidvassallo.me>*
…On 26 April 2017 at 20:51, Dan Parriott ***@***.***> wrote:
Merged #1102 <#1102>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1102 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFlDbWPAQxZFguXB7ZL3FK968vjtAZymks5rz5IagaJpZM4M0bjG>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous method (using ctime) has a number of issues that make it a bit weird to integrate with popular logging tools like ELK:
Easier method would be as proposed - simply output the timestamp in UNIX/EPOCH format. In this case it's millisecond epoch format - this is far more unambiguous for log parsers
This change is