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 timestamp formatting to EventStringFormatter #2083

Merged
merged 2 commits into from
Jul 25, 2016

Conversation

urso
Copy link

@urso urso commented Jul 22, 2016

Add date formatter to libbeat/common/dtfmt. Pattern syntax supported
is subset of joda DateTimeFormat

@urso urso added enhancement review libbeat in progress Pull request is currently in progress. and removed review labels Jul 22, 2016
@urso urso force-pushed the enh/fmtstr-with-timestamps branch from c27f78e to 74ecefb Compare July 22, 2016 16:57
@urso urso added review and removed in progress Pull request is currently in progress. labels Jul 22, 2016
@ruflin
Copy link
Contributor

ruflin commented Jul 25, 2016

We will need this for index_pattern?

@urso
Copy link
Author

urso commented Jul 25, 2016

yes. I want similar formatting support as logstash for index_pattern

{mkDate(2015, 1, 1), "xx.w.E", "15.1.Thu"},
{mkDate(2014, 12, 31), "xx.w.E", "15.1.Wed"},
{mkDate(2015, 1, 1), "xx.w.EEEE", "15.1.Thursday"},
{mkDate(2014, 12, 31), "xx.w.EEEE", "15.1.Wednesday"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe also add a test with xxxx.ww which is the format recommended by the Logstash docs.

Copy link
Author

Choose a reason for hiding this comment

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

done

urso added 2 commits July 25, 2016 15:55
Add date formatter to libbeat/common/dtfmt. Pattern syntax supported
is subset of joda DateTimeFormat
@urso urso force-pushed the enh/fmtstr-with-timestamps branch from 74ecefb to 33d06a6 Compare July 25, 2016 13:55
@tsg
Copy link
Contributor

tsg commented Jul 25, 2016

Amazing work, @urso! This code is actually a lot cleaner than the stdlib formatter. 👍

LGTM

@tsg tsg merged commit c5c51dd into elastic:master Jul 25, 2016
@urso urso deleted the enh/fmtstr-with-timestamps branch February 19, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants