Skip to content

Ensure @timestamp, log.level, and message fields are ordered per spec - #28

Merged
sethmlarson merged 2 commits into
elastic:masterfrom
sethmlarson:ordered-fields
Jan 7, 2021
Merged

Ensure @timestamp, log.level, and message fields are ordered per spec#28
sethmlarson merged 2 commits into
elastic:masterfrom
sethmlarson:ordered-fields

Conversation

@sethmlarson

Copy link
Copy Markdown
Contributor

Relates to #26

@ghost

ghost commented Jan 7, 2021

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #28 updated

  • Start Time: 2021-01-07T17:23:00.635+0000

  • Duration: 6 min 12 sec

Test stats 🧪

Test Results
Failed 0
Passed 231
Skipped 10
Total 241

@basepi basepi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This has a lot of code smell but I'm not sure how else you would order certain keys to match the spec. Looks good.

@sethmlarson

Copy link
Copy Markdown
Contributor Author

A lot of the not-great code is for the JSON serializer, gonna try subclassing JSONEncoder and see if that's any better?

@sethmlarson

Copy link
Copy Markdown
Contributor Author

The JSONEncoder route didn't yield any better results, going to merge this.

@sethmlarson
sethmlarson merged commit ee288d8 into elastic:master Jan 7, 2021
@sethmlarson
sethmlarson deleted the ordered-fields branch January 7, 2021 22:46
Rawk added a commit to Rawk/ecs-logging-python that referenced this pull request Jan 25, 2021
Update example output after changes in elastic#28 .
@Rawk Rawk mentioned this pull request Jan 25, 2021
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.

2 participants