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

plugin: Improve flter_record_transformer #1663

Merged
merged 2 commits into from
Aug 17, 2017

Conversation

yurano
Copy link
Contributor

@yurano yurano commented Aug 15, 2017

  • 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 #1240

- 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
@repeatedly repeatedly added the bug Something isn't working label Aug 15, 2017
@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
Copy link
Member

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.

Copy link
Contributor Author

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.

@yurano
Copy link
Contributor Author

yurano commented Aug 17, 2017

Please note the follows:

I'm going to change types of keep_keys and remove_keys option.
Therefore, I think fixing this document is also needed if this PR is accepted.

I couldn't find docs in this repo, so that I didn't take care of it.

@repeatedly
Copy link
Member

docs repository is here: https://github.com/fluent/fluentd-docs

@yurano
Copy link
Contributor Author

yurano commented Aug 17, 2017

@repeatedly

docs repository is here: https://github.com/fluent/fluentd-docs

Thanks.
And I've just found in the contribution guide, sorry.

I'll open an issue and send PR for this problem when this PR will be merged.

@repeatedly repeatedly merged commit d926248 into fluent:master Aug 17, 2017
@repeatedly
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

record_transformer keep_keys option creates keys with 'nil' values for unset keys.
2 participants