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

Switch FastDateFormat to DateTimeFormatter #377

Merged
merged 7 commits into from
Jan 2, 2021

Conversation

philsttr
Copy link
Collaborator

@philsttr philsttr commented Nov 23, 2019

Switch usage of FastDateFormat to DateTimeFormatter

Remove dependency on apache commons-lang3 (since FastDateFormat was the only thing being used).

Switch default timestamp format to DateTimeFormatter.ISO_OFFSET_DATE_TIME

Added the ability to specify DateTimeFormatter constant names as patterns.

This change is NOT fully backwards compatible, since:

  • the default timestamp pattern changed to DateTimeFormatter.ISO_OFFSET_DATE_TIME
  • the pattern strings supported by DateTimeFormatter are not exactly the same as those supported previously by FastDateFormat

When this PR is merged, the major version will need to be bumped due to the backwards incompatibilities.
Therefore, holding off on merging this PR until ready for a new major release.

Remove dependency on apache commons-lang3 (since FastDateFormat was the only thing being used).

Switch default timestamp format to DateTimeFormatter.ISO_OFFSET_DATE_TIME

Added the ability to specify DateTimeFormatter constant names as patterns.

This change is NOT fully backwards compatible, since:
* the default timestamp pattern changed to DateTimeFormatter.ISO_OFFSET_DATE_TIME
* the pattern strings supported by DateTimeFormatter are not exactly the same as those supported by FastDateFormat
@mfriess2
Copy link

mfriess2 commented Aug 7, 2020

We have the problem with the randomly sorted log messages, too (if their millisecond-precision-timestamps are the same).
Are there any plans on releasing this patch soon?

ELK released the fix with 7.0? elastic/elasticsearch#10005
However, Logback still seems to be unfinished, too? https://jira.qos.ch/browse/LOGBACK-1374

@philsttr
Copy link
Collaborator Author

philsttr commented Aug 7, 2020

Hi @mfriess2 , this change to logstash-logback-encoder to switch to DateTimeFormatter, by itself, will not help your situation. Higher precision timestamps will need to be supported in logback (via the logback issue you mentioned) before logstash-logback-encoder can take advantage of them. Since the pace of development of logback is extremely slow, and this would likely be a major change to logback, I am not expecting it to be implemented in logback any time soon.

@philsttr philsttr merged commit 34b4d28 into master Jan 2, 2021
@philsttr philsttr deleted the switch_FastDateFormat_to_DateTimeFormatter branch January 2, 2021 22:47
@philsttr philsttr added this to the 7.0 milestone Jan 2, 2021
@philsttr philsttr added the warn/api-change Breaking change with compilation or xml configuration errors label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warn/api-change Breaking change with compilation or xml configuration errors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants