logstash-input-file 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/filewatch/bootstrap.rb +1 -1
- data/lib/filewatch/sincedb_collection.rb +1 -1
- data/lib/jars/filewatch-1.0.0.jar +0 -0
- data/logstash-input-file.gemspec +1 -1
- data/spec/filewatch/reading_spec.rb +16 -0
- 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: f4177a21fb94dc920a0226ca698ed1bf5a6d96203a2582de150f1b1984b6ab8d
|
4
|
+
data.tar.gz: 8cdbb99975efb2bda21ed8d1745f5f5f668a6275c89e35718e2a312365cdfd5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4552c42974950d4f9490a13883ab77118e21b1f54fa1b7d3cfd83e99191660f15811df0364fe4ee8948fbffa7370aacc67ddc965dc2d02b44992586392bd9b63
|
7
|
+
data.tar.gz: '00287236b17611e36d6754a265507aa6a31c18e76152e4265853ca7e1c36870865d298e66db905b87dd860b769f754a745abbf4f74eafb2511f91341d3a71c2a'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 4.1.1
|
2
|
+
- Fix JAR_VERSION read problem, prevented Logstash from starting.
|
3
|
+
[Issue #180](https://github.com/logstash-plugins/logstash-input-file/issues/180)
|
4
|
+
- Fix sincedb write error when using /dev/null, repeatedly causes a plugin restart.
|
5
|
+
[Issue #182](https://github.com/logstash-plugins/logstash-input-file/issues/182)
|
6
|
+
|
1
7
|
## 4.1.0
|
2
8
|
- Move Filewatch code into the plugin folder, rework Filewatch code to use
|
3
9
|
Logstash facilities like logging and environment.
|
data/lib/filewatch/bootstrap.rb
CHANGED
@@ -30,7 +30,7 @@ module FileWatch
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
jar_version =
|
33
|
+
jar_version = Pathname.new(__FILE__).dirname.join("../../JAR_VERSION").realpath.read.strip
|
34
34
|
|
35
35
|
require "java"
|
36
36
|
require_relative "../../lib/jars/filewatch-#{jar_version}.jar"
|
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.1.
|
4
|
+
s.version = '4.1.1'
|
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"
|
@@ -55,6 +55,22 @@ module FileWatch
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
+
context "when watching a directory with files and sincedb_path is /dev/null or NUL" do
|
59
|
+
let(:directory) { Stud::Temporary.directory }
|
60
|
+
let(:sincedb_path) { File::NULL }
|
61
|
+
let(:watch_dir) { ::File.join(directory, "*.log") }
|
62
|
+
let(:file_path) { ::File.join(directory, "1.log") }
|
63
|
+
|
64
|
+
it "the file is read" do
|
65
|
+
File.open(file_path, "wb") { |file| file.write("line1\nline2\n") }
|
66
|
+
actions.activate
|
67
|
+
reading.watch_this(watch_dir)
|
68
|
+
reading.subscribe(observer)
|
69
|
+
expect(observer.listener_for(file_path).calls).to eq([:open, :accept, :accept, :eof, :delete])
|
70
|
+
expect(observer.listener_for(file_path).lines).to eq(["line1", "line2"])
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
58
74
|
context "when watching a directory with files using striped reading" do
|
59
75
|
let(:directory) { Stud::Temporary.directory }
|
60
76
|
let(:watch_dir) { ::File.join(directory, "*.log") }
|
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.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|