lib/fluent/plugin/in_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-custom-0.3.2 vs lib/fluent/plugin/in_gcloud_pubsub.rb in fluent-plugin-gcloud-pubsub-custom-0.3.3
- old
+ new
@@ -196,10 +196,11 @@
end
def process(messages)
es = MultiEventStream.new
messages.each do |m|
- @parser.parse(m.message.data.chomp) do |time, record|
+ line = m.message.data.chomp
+ @parser.parse(line) do |time, record|
if time && record
es.add(time, record)
else
raise FailedParseError.new "pattern not match: #{line.inspect}"
end