lib/fluent/plugin/in_sqs.rb in fluent-plugin-aws-sqs-1.0.2 vs lib/fluent/plugin/in_sqs.rb in fluent-plugin-aws-sqs-1.0.3
- old
+ new
@@ -57,12 +57,12 @@
message.delete if @delete_message
router.emit(@tag, Fluent::Engine.now, record)
end
- rescue
- log.error 'failed to emit or receive', error: $ERROR_INFO.to_s, error_class: $ERROR_INFO.class.to_s
- log.warn_backtrace $ERROR_INFO.backtrace
+ rescue => ex
+ log.error 'failed to emit or receive', error: ex.to_s, error_class: ex.class
+ log.warn_backtrace ex.backtrace
end
private
def parse_message(message)