-
Notifications
You must be signed in to change notification settings - Fork 24
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
use Event#from_json if available #19
use Event#from_json if available #19
Conversation
why do we need to preserve support for legacy? I feel like if that is necessary, then #4631 should be modified to the point that it just works |
LGTM |
Well it's a new api on LogStash::Event so either we force a minimum version for logstash-core or support legacy "for a while". |
+1 Good stuff. |
this makes me realize we should document that in the code. |
will wait to see what we do related to the json array case as discussed in elastic/logstash#4631 |
Last commit not handles the new |
thanks. fixed :P |
can we add tests for both the new and legacy? |
@talevy it would be a good idea but not sure how exactly. the alias method happens at class load time so once in the specs that alias already exists. maybe re-alias in the specs? but this is very implementation specific. maybe move the aliasing in the register method and expose a new public method such as |
@talevy I just pushed changes to support testing both contexts. let me know what you think and if that makes sense I'll apply the same logic to the json codec. |
LGTM |
cosmetic reindent refactor for the array return value of from_json wrong paramter refactor to support testing from_json and legacy parser refactor to support testing from_json and legacy parser - take2
rebasing, bumping version, merging & pushing. |
e219e88
to
6186ad6
Compare
published 2.1.0 |
relates to https://github.com/elastic/logstash/pull/4631and elastic/logstash#4595
the decode method will use Event#from_json if it is available for a significant performance improvement with the Java Event implementation.