lib/fluent/plugin/formatter_protobuf.rb in fluent-plugin-formatter-protobuf-0.0.2 vs lib/fluent/plugin/formatter_protobuf.rb in fluent-plugin-formatter-protobuf-0.0.3

- old
+ new

@@ -46,9 +46,13 @@ raise Fluent::ConfigError, "message name '#{@message_name}' not found" if message_lookup.nil? @protobuf_class = message_lookup.msgclass end + def formatter_type + :binary + end + def format(_tag, _time, record) protobuf_msg = @protobuf_class.new(record) @protobuf_class.encode(protobuf_msg) end