logstash-input-file 4.2.3 → 4.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/filewatch/sincedb_collection.rb +1 -1
- data/lib/jars/filewatch-1.0.1.jar +0 -0
- data/logstash-input-file.gemspec +1 -1
- data/spec/filewatch/reading_spec.rb +4 -4
- data/spec/filewatch/rotate_spec.rb +4 -4
- data/spec/filewatch/tailing_spec.rb +10 -10
- data/spec/inputs/file_read_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2970d560b9e8225f4836f8ac751d3502298b8138a59b39945bc037d62b8edfd7
|
4
|
+
data.tar.gz: 0e3dd6f277a11acc12e5e02e3eab368dbe4c180b1bb7598dbc221cd5fc0a6cea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 792cc9de537e342df689c920419a036689f8ecee9ea015ab37ae0838925dc23872fa4b168a9210f768145d917d1bff39e8d6a718bb66afce37a54205aff02e9f
|
7
|
+
data.tar.gz: f94e97ec177e42289b4d651bc32ee8079ca2f4c5146db88cf0921a6a61ae8729e9a2502035a7a6f0042b657449b488cde7c826a988ad512b4736f0b5a669dd4b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 4.2.4
|
2
|
+
- Fix: sincedb_write issue on Windows machines [#283](https://github.com/logstash-plugins/logstash-input-file/pull/283)
|
3
|
+
|
1
4
|
## 4.2.3
|
2
5
|
- Refactor: improve debug logging (log catched exceptions) [#280](https://github.com/logstash-plugins/logstash-input-file/pull/280)
|
3
6
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Logstash Plugin
|
2
2
|
Travis Build
|
3
|
-
[![Travis Build Status](https://travis-ci.
|
3
|
+
[![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-input-file.svg)](https://travis-ci.com/logstash-plugins/logstash-input-file)
|
4
4
|
|
5
5
|
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
6
6
|
|
Binary file
|
data/logstash-input-file.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-file'
|
4
|
-
s.version = '4.2.
|
4
|
+
s.version = '4.2.4'
|
5
5
|
s.licenses = ['Apache-2.0']
|
6
6
|
s.summary = "Streams events from files"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -91,7 +91,7 @@ module FileWatch
|
|
91
91
|
context "when watching a directory with files using striped reading" do
|
92
92
|
let(:file_path2) { ::File.join(directory, "2.log") }
|
93
93
|
# use a chunk size that does not align with the line boundaries
|
94
|
-
let(:opts) { super.merge(:file_chunk_size => 10, :file_chunk_count => 1, :file_sort_by => "path")}
|
94
|
+
let(:opts) { super().merge(:file_chunk_size => 10, :file_chunk_count => 1, :file_sort_by => "path")}
|
95
95
|
let(:lines) { [] }
|
96
96
|
let(:observer) { TestObserver.new(lines) }
|
97
97
|
let(:listener2) { observer.listener_for(file_path2) }
|
@@ -121,7 +121,7 @@ module FileWatch
|
|
121
121
|
end
|
122
122
|
|
123
123
|
context "when a non default delimiter is specified and it is not in the content" do
|
124
|
-
let(:opts) { super.merge(:delimiter => "\nø") }
|
124
|
+
let(:opts) { super().merge(:delimiter => "\nø") }
|
125
125
|
let(:actions) do
|
126
126
|
RSpec::Sequencing.run("create file") do
|
127
127
|
File.open(file_path, "wb") { |file| file.write("line1\nline2") }
|
@@ -154,7 +154,7 @@ module FileWatch
|
|
154
154
|
let(:file_path2) { ::File.join(directory, "2.log") }
|
155
155
|
let(:file_path3) { ::File.join(directory, "3.log") }
|
156
156
|
|
157
|
-
let(:opts) { super.merge(:file_sort_by => "last_modified") }
|
157
|
+
let(:opts) { super().merge(:file_sort_by => "last_modified") }
|
158
158
|
let(:lines) { [] }
|
159
159
|
let(:observer) { TestObserver.new(lines) }
|
160
160
|
|
@@ -195,7 +195,7 @@ module FileWatch
|
|
195
195
|
end
|
196
196
|
|
197
197
|
context "when watching a directory with files using exit_after_read" do
|
198
|
-
let(:opts) { super.merge(:exit_after_read => true, :max_open_files => 2) }
|
198
|
+
let(:opts) { super().merge(:exit_after_read => true, :max_open_files => 2) }
|
199
199
|
let(:file_path3) { ::File.join(directory, "3.log") }
|
200
200
|
let(:file_path4) { ::File.join(directory, "4.log") }
|
201
201
|
let(:file_path5) { ::File.join(directory, "5.log") }
|
@@ -219,7 +219,7 @@ module FileWatch
|
|
219
219
|
end
|
220
220
|
|
221
221
|
context "create + rename rotation: when a new logfile is renamed to a path we have seen before but not all content from the previous the file is read" do
|
222
|
-
let(:opts) { super.merge(
|
222
|
+
let(:opts) { super().merge(
|
223
223
|
:file_chunk_size => line1.bytesize.succ,
|
224
224
|
:file_chunk_count => 1
|
225
225
|
) }
|
@@ -296,7 +296,7 @@ module FileWatch
|
|
296
296
|
end
|
297
297
|
|
298
298
|
context "copy + truncate rotation: when a logfile is copied to a new path and truncated before the open file is fully read" do
|
299
|
-
let(:opts) { super.merge(
|
299
|
+
let(:opts) { super().merge(
|
300
300
|
:file_chunk_size => line1.bytesize.succ,
|
301
301
|
:file_chunk_count => 1
|
302
302
|
) }
|
@@ -370,7 +370,7 @@ module FileWatch
|
|
370
370
|
end
|
371
371
|
|
372
372
|
context "? rotation: when an active file is renamed inside the glob and the reading lags behind" do
|
373
|
-
let(:opts) { super.merge(
|
373
|
+
let(:opts) { super().merge(
|
374
374
|
:file_chunk_size => line1.bytesize.succ,
|
375
375
|
:file_chunk_count => 2
|
376
376
|
) }
|
@@ -409,7 +409,7 @@ module FileWatch
|
|
409
409
|
end
|
410
410
|
|
411
411
|
context "? rotation: when a not active file is rotated outside the glob before the file is read" do
|
412
|
-
let(:opts) { super.merge(
|
412
|
+
let(:opts) { super().merge(
|
413
413
|
:close_older => 3600,
|
414
414
|
:max_open_files => 1,
|
415
415
|
:file_sort_by => "path"
|
@@ -77,7 +77,7 @@ module FileWatch
|
|
77
77
|
|
78
78
|
context "when close_older is set" do
|
79
79
|
let(:wait_before_quit) { 0.8 }
|
80
|
-
let(:opts) { super.merge(:close_older => 0.1, :max_open_files => 1, :stat_interval => 0.1) }
|
80
|
+
let(:opts) { super().merge(:close_older => 0.1, :max_open_files => 1, :stat_interval => 0.1) }
|
81
81
|
let(:suffix) { "B" }
|
82
82
|
it "opens both files" do
|
83
83
|
actions.activate_quietly
|
@@ -278,7 +278,7 @@ module FileWatch
|
|
278
278
|
|
279
279
|
context "when watching a directory with files and a file is renamed to match glob", :unix => true do
|
280
280
|
let(:suffix) { "H" }
|
281
|
-
let(:opts) { super.merge(:close_older => 0) }
|
281
|
+
let(:opts) { super().merge(:close_older => 0) }
|
282
282
|
let(:listener2) { observer.listener_for(file_path2) }
|
283
283
|
let(:actions) do
|
284
284
|
RSpec::Sequencing
|
@@ -346,7 +346,7 @@ module FileWatch
|
|
346
346
|
end
|
347
347
|
|
348
348
|
context "when close older expiry is enabled" do
|
349
|
-
let(:opts) { super.merge(:close_older => 1) }
|
349
|
+
let(:opts) { super().merge(:close_older => 1) }
|
350
350
|
let(:suffix) { "J" }
|
351
351
|
let(:actions) do
|
352
352
|
RSpec::Sequencing.run("create file") do
|
@@ -370,7 +370,7 @@ module FileWatch
|
|
370
370
|
end
|
371
371
|
|
372
372
|
context "when close older expiry is enabled and after timeout the file is appended-to" do
|
373
|
-
let(:opts) { super.merge(:close_older => 0.5) }
|
373
|
+
let(:opts) { super().merge(:close_older => 0.5) }
|
374
374
|
let(:suffix) { "K" }
|
375
375
|
let(:actions) do
|
376
376
|
RSpec::Sequencing
|
@@ -406,7 +406,7 @@ module FileWatch
|
|
406
406
|
end
|
407
407
|
|
408
408
|
context "when ignore older expiry is enabled and all files are already expired" do
|
409
|
-
let(:opts) { super.merge(:ignore_older => 1) }
|
409
|
+
let(:opts) { super().merge(:ignore_older => 1) }
|
410
410
|
let(:suffix) { "L" }
|
411
411
|
let(:actions) do
|
412
412
|
RSpec::Sequencing
|
@@ -430,7 +430,7 @@ module FileWatch
|
|
430
430
|
|
431
431
|
context "when a file is renamed before it gets activated", :unix => true do
|
432
432
|
let(:max) { 1 }
|
433
|
-
let(:opts) { super.merge(:file_chunk_count => 8, :file_chunk_size => 6, :close_older => 0.1, :discover_interval => 6) }
|
433
|
+
let(:opts) { super().merge(:file_chunk_count => 8, :file_chunk_size => 6, :close_older => 0.1, :discover_interval => 6) }
|
434
434
|
let(:suffix) { "M" }
|
435
435
|
let(:start_new_files_at) { :beginning } # we are creating files and sincedb record before hand
|
436
436
|
let(:actions) do
|
@@ -469,7 +469,7 @@ module FileWatch
|
|
469
469
|
end
|
470
470
|
|
471
471
|
context "when ignore_older is less than close_older and all files are not expired" do
|
472
|
-
let(:opts) { super.merge(:ignore_older => 1, :close_older => 1.1) }
|
472
|
+
let(:opts) { super().merge(:ignore_older => 1, :close_older => 1.1) }
|
473
473
|
let(:suffix) { "N" }
|
474
474
|
let(:start_new_files_at) { :beginning }
|
475
475
|
let(:actions) do
|
@@ -497,7 +497,7 @@ module FileWatch
|
|
497
497
|
end
|
498
498
|
|
499
499
|
context "when ignore_older is less than close_older and all files are expired" do
|
500
|
-
let(:opts) { super.merge(:ignore_older => 10, :close_older => 1) }
|
500
|
+
let(:opts) { super().merge(:ignore_older => 10, :close_older => 1) }
|
501
501
|
let(:suffix) { "P" }
|
502
502
|
let(:actions) do
|
503
503
|
RSpec::Sequencing
|
@@ -522,7 +522,7 @@ module FileWatch
|
|
522
522
|
end
|
523
523
|
|
524
524
|
context "when ignore older and close older expiry is enabled and after timeout the file is appended-to" do
|
525
|
-
let(:opts) { super.merge(:ignore_older => 20, :close_older => 0.5) }
|
525
|
+
let(:opts) { super().merge(:ignore_older => 20, :close_older => 0.5) }
|
526
526
|
let(:suffix) { "Q" }
|
527
527
|
let(:actions) do
|
528
528
|
RSpec::Sequencing
|
@@ -551,7 +551,7 @@ module FileWatch
|
|
551
551
|
end
|
552
552
|
|
553
553
|
context "when a non default delimiter is specified and it is not in the content" do
|
554
|
-
let(:opts) { super.merge(:ignore_older => 20, :close_older => 1, :delimiter => "\nø") }
|
554
|
+
let(:opts) { super().merge(:ignore_older => 20, :close_older => 1, :delimiter => "\nø") }
|
555
555
|
let(:suffix) { "R" }
|
556
556
|
let(:actions) do
|
557
557
|
RSpec::Sequencing
|
@@ -267,7 +267,7 @@ describe LogStash::Inputs::File do
|
|
267
267
|
describe 'delete on complete' do
|
268
268
|
|
269
269
|
let(:options) do
|
270
|
-
super.merge({ 'file_completed_action' => "delete", 'exit_after_read' => false })
|
270
|
+
super().merge({ 'file_completed_action' => "delete", 'exit_after_read' => false })
|
271
271
|
end
|
272
272
|
|
273
273
|
let(:sample_file) { File.join(temp_directory, "sample.log") }
|
@@ -306,7 +306,7 @@ describe LogStash::Inputs::File do
|
|
306
306
|
describe 'sincedb cleanup' do
|
307
307
|
|
308
308
|
let(:options) do
|
309
|
-
super.merge(
|
309
|
+
super().merge(
|
310
310
|
'sincedb_path' => sincedb_path,
|
311
311
|
'sincedb_clean_after' => '1.0 seconds',
|
312
312
|
'sincedb_write_interval' => 0.25,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-file
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|