Skip to content

Commit 4b8fb26

Browse files
committed
out_s3: add log to output unexpected error in Tempfile#close
It is difficult to take any action deal with as there was no output if Tempfile#close caused unexpected error. So, this patch will add a log to know that an error has occurred in Tempfile#close. Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent 58855ad commit 4b8fb26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/fluent/plugin/out_s3.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,11 @@ def write(chunk)
388388
end
389389
end
390390
ensure
391-
tmp.close(true) rescue nil
391+
begin
392+
tmp.close(true)
393+
rescue => e
394+
log.info "out_s3: Tempfile#close causes unexpected error", error: e
395+
end
392396
end
393397
end
394398

0 commit comments

Comments
 (0)