-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
plugin: Improve flter_record_transformer #1663
plugin: Improve flter_record_transformer #1663
Conversation
- Change types of `keep_keys` and `remove_keys` string into array - Don't create new keys if the original record doesn't have keys specified `keep_keys` option fix fluent#1240
@keep_keys.each {|k| new_record[k] = record[k]} if @keep_keys and @renew_record | ||
@keep_keys.each do |k| | ||
new_record[k] = record[k] if record.has_key?(k) | ||
end if @keep_keys and @renew_record |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use &&
instead of and
?
This is not related with this patch but we want to unify condition style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take care of it soon.
Please note the follows: I'm going to change types of I couldn't find docs in this repo, so that I didn't take care of it. |
docs repository is here: https://github.com/fluent/fluentd-docs |
Thanks. I'll open an issue and send PR for this problem when this PR will be merged. |
Thanks! |
…rmer plugin: Improve flter_record_transformer
keep_keys
andremove_keys
string into arraykeep_keys
optionfix #1240