diff --git a/lib/fluent/plugin/out_s3.rb b/lib/fluent/plugin/out_s3.rb index 71f14c6..b04ee6c 100644 --- a/lib/fluent/plugin/out_s3.rb +++ b/lib/fluent/plugin/out_s3.rb @@ -388,7 +388,11 @@ def write(chunk) end end ensure - tmp.close(true) rescue nil + begin + tmp.close(true) + rescue => e + log.info "out_s3: Tempfile#close caused unexpected error", error: e + end end end