Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add milliseconds to the log time format #339

Merged
merged 1 commit into from
Oct 10, 2017
Merged

Conversation

allait
Copy link
Contributor

@allait allait commented Oct 9, 2017

Allows keeping the order of events when logs are streamed to Kibana.

Removing TIME_FORMAT argument from log formatters makes python use the default formatTime logic that adds record.msec to the formatted string. The default time format is the same as the one we define, except it uses a space instead of T to separate date from time. Since we don't rely on splitting fields with whitespace in JSON logs this shouldn't be a problem.

@allait allait force-pushed the millisecond-log-time-format branch from c037055 to 1c13968 Compare October 9, 2017 15:34
Copy link
Contributor

@samuelhwilliams samuelhwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Allows keeping the order of events when logs are streamed to Kibana.

Removing TIME_FORMAT argument from log formatters makes python use
the default `formatTime` logic that adds `record.msec` to the formatted
string. The default time format is the same as the one we define, except
it uses a space instead of `T` to separate date from time. Since we
don't rely on splitting fields with whitespace in JSON logs this
shouldn't be a problem.
@allait allait force-pushed the millisecond-log-time-format branch from 1c13968 to 193e9c6 Compare October 10, 2017 09:32
@allait allait merged commit 0770742 into master Oct 10, 2017
@allait allait deleted the millisecond-log-time-format branch October 10, 2017 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants