@@ -37,10 +37,8 @@ def handle_specifically(watched_file)
37
37
end
38
38
watched_file . listener . eof
39
39
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 )
44
42
watched_file . listener . error
45
43
else
46
44
sincedb_collection . store_last_read ( key , watched_file . last_stat_size )
@@ -64,7 +62,8 @@ def close_and_ignore_ioexception(closeable)
64
62
begin
65
63
closeable . close
66
64
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 )
68
67
end
69
68
end
70
69
@@ -79,7 +78,8 @@ def corrupted?(watched_file)
79
78
return false
80
79
rescue ZipException => e
81
80
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 ) )
83
83
return true
84
84
ensure
85
85
close_and_ignore_ioexception ( gzip_stream ) unless gzip_stream . nil?
0 commit comments