Skip to content

Commit ab806e8

Browse files
committed
Fixed tast nipticks and updated version to 4.1.16
1 parent 2604b81 commit ab806e8

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
<<<<<<< HEAD
12
## 4.1.17
23
- Added configuration setting `check_archive_validity` settings to enable gzipped files verification,
34
issue [#261](https://github.com/logstash-plugins/logstash-input-file/issues/261)
5+
## 4.1.16
6+
- Added configuration setting `check_archive_validity` settings to enable gzipped files verification,
7+
issue [#261](https://github.com/logstash-plugins/logstash-input-file/issues/261)
48

59
## 4.1.16
610
- Added configuration setting exit_after_read to read to EOF and terminate

Diff for: lib/filewatch/read_mode/handlers/read_zip_file.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ def handle_specifically(watched_file)
3737
end
3838
watched_file.listener.eof
3939
rescue ZipException => e
40-
logger.error("Cannot decompress the gzip file at path: #{watched_file.path}", :exception => e,
41-
:class => e.class.name,
42-
:message => e.message,
43-
:backtrace => e.backtrace)
40+
logger.error("Cannot decompress the gzip file at path: #{watched_file.path}", :exception => e.class,
41+
:message => e.message, :backtrace => e.backtrace)
4442
watched_file.listener.error
4543
else
4644
sincedb_collection.store_last_read(key, watched_file.last_stat_size)
@@ -64,7 +62,8 @@ def close_and_ignore_ioexception(closeable)
6462
begin
6563
closeable.close
6664
rescue Exception => e # IOException can be thrown by any of the Java classes that implement the Closable interface.
67-
logger.warn("Ignoring an IOException when closing an instance of #{closeable.class.name}", "exception" => e)
65+
logger.warn("Ignoring an IOException when closing an instance of #{closeable.class.name}",
66+
:exception => e.class, :message => e.message, :backtrace => e.backtrace)
6867
end
6968
end
7069

@@ -79,7 +78,8 @@ def corrupted?(watched_file)
7978
return false
8079
rescue ZipException => e
8180
duration = Time.now - start
82-
logger.warn("#{watched_file.path} is corrupted, #{duration} secs, message: #{e.message}")
81+
logger.warn("Detected corrupted archive #{watched_file.path} file won't be processed", :message => e.message,
82+
:duration => duration.round(3))
8383
return true
8484
ensure
8585
close_and_ignore_ioexception(gzip_stream) unless gzip_stream.nil?

0 commit comments

Comments
 (0)