tagomoris / fluent-plugin-parser

Other
74 stars 23 forks source link

Add ignore_key_not_exist option to filter_parser. #33

Closed osamunmun closed 8 years ago

osamunmun commented 8 years ago

If 'key_name' doesn't exist, I got "ArgumentError parser io argument must be a String or respond to readpartial() or read()." from Oj.load(nil) at line45 @parser.parse .

Adding "oj" to gemspec may not be good idea, I couldn't catch up with any good idea about testing the case of "oj".

tagomoris commented 8 years ago

Good catch! I have some points for this change:

IMO, this plugin should do these for missing specified key-values:

@osamunmun How do you think about updating your patch like this?

osamunmun commented 8 years ago

@tagomoris I agree with your suggestion about warn, skip and emit same record. I have changed them, and added same code into out_parser.

tagomoris commented 8 years ago

Thanks! LGTM.

tagomoris commented 8 years ago

Released v0.6.1 with this change.