Closed ermaker closed 8 years ago
The superclass of Fluent::DeparserFilter is Fluent::Output now. (see https://github.com/tagomoris/fluent-plugin-parser/blob/master/lib/fluent/plugin/filter_deparser.rb#L1) But the similar class Fluent::ParserFilter has Fluent::Filter as the superclass. (see https://github.com/tagomoris/fluent-plugin-parser/blob/master/lib/fluent/plugin/filter_parser.rb#L3)
I think all filter classes are the subclass of Fluent::Filter. What do you think about this?
I have an issue with this configuration:
# td-agent.conf # ... <filter **> @type deparser format %s format_key_names log key_name message reserve_data yes </filter> # ...
And the result is here:
... fluentd_1 | 2016-01-10 11:27:52 +0000 [warn]: emit transaction failed: error_class=NoMethodError error="undefined method `emit' for #<Fluent::DeparserFilter:0x000000010edef8>" tag="docker.xing.ruby" ...
And if modify the supperclass of Fluent::DeparserFilter to Fluent::Filter, it just works well.
I don't have any idea to make testcase for this case because just normal test cases are all works on unittest but not real situation.
The superclass of Fluent::DeparserFilter is Fluent::Output now. (see https://github.com/tagomoris/fluent-plugin-parser/blob/master/lib/fluent/plugin/filter_deparser.rb#L1) But the similar class Fluent::ParserFilter has Fluent::Filter as the superclass. (see https://github.com/tagomoris/fluent-plugin-parser/blob/master/lib/fluent/plugin/filter_parser.rb#L3)
I think all filter classes are the subclass of Fluent::Filter. What do you think about this?
I have an issue with this configuration:
And the result is here:
And if modify the supperclass of Fluent::DeparserFilter to Fluent::Filter, it just works well.
I don't have any idea to make testcase for this case because just normal test cases are all works on unittest but not real situation.