lib/fluent/plugin/out_sns.rb in fluent-plugin-sns-2.1.0 vs lib/fluent/plugin/out_sns.rb in fluent-plugin-sns-2.1.1

- old
+ new

@@ -66,25 +66,24 @@ chain.next es.each {|time,record| record['time'] = Time.at(time).localtime body = get_body(record).force_encoding('UTF-8') subject = get_subject(record).force_encoding('UTF-8').gsub(/(\r\n|\r|\n)/, '') - puts "subject:#{subject}, body:#{body}" @topic.publish( body, :subject => subject ) } end def get_subject(record) unless @subject_template.nil? return @subject_template.result(binding) end - subject = record[@sns_subject_key].to_s || @sns_subject || 'Fluentd-Notification' + subject = record[@sns_subject_key].to_s || @sns_subject.to_s || 'Fluentd-Notification' end def get_body(record) unless @body_template.nil? return @body_template.result(binding) end - record[@sns_body_key] || @sns_body || record.to_json + record[@sns_body_key].to_s || @sns_body.to_s || record.to_json end end end