logstash-input-file 4.1.12 → 4.1.13
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 +5 -0
- data/lib/filewatch/sincedb_record_serializer.rb +1 -1
- data/lib/jars/filewatch-1.0.1.jar +0 -0
- data/logstash-input-file.gemspec +1 -1
- data/spec/filewatch/sincedb_record_serializer_spec.rb +30 -5
- 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: 256f10c0054f1cabe7fde22c6522dc3c1cf92c169b2584e9e05de977891aab09
|
4
|
+
data.tar.gz: 96ff5670352287242b9ec116ee4b4bd5051e5256f00bcdf1ef0ef8fba3115c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed265f6a90f677a66c6dcd5823d10e043b1be2c9836e1f5001d3ae4485a1f4496bc8ae4d34781ed79cda6778a8362c2e97b34d41161a0ec3248e10ac70b4c77f
|
7
|
+
data.tar.gz: b776efe42fb2eadf40b39ce5ba031e4686295b19baaeb20b50608ece46143acd8515e49c65028a5ccb0c0e3732011dcff194f535e4fd9c64b4076f5423a711d9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 4.1.13
|
2
|
+
- Fixed sinceDB to work spaces filename [#249](https://github.com/logstash-plugins/logstash-input-file/pull/249)
|
3
|
+
|
1
4
|
## 4.1.12
|
2
5
|
- Fix regression in `exclude` handling. Patterns are matched against the filename, not full path.
|
3
6
|
[Issue #237](https://github.com/logstash-plugins/logstash-input-file/issues/237)
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ module FileWatch
|
|
51
51
|
inode_struct = prepare_inode_struct(parts)
|
52
52
|
pos = parts.shift.to_i
|
53
53
|
expires_at = Float(parts.shift) # this is like Time.now.to_f
|
54
|
-
path_in_sincedb = parts.
|
54
|
+
path_in_sincedb = parts.join(" ")
|
55
55
|
value = SincedbValue.new(pos, expires_at).add_path_in_sincedb(path_in_sincedb)
|
56
56
|
[inode_struct, value]
|
57
57
|
end
|
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.13'
|
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"
|
@@ -9,30 +9,55 @@ module FileWatch
|
|
9
9
|
let(:io) { StringIO.new }
|
10
10
|
let(:db) { Hash.new }
|
11
11
|
|
12
|
-
subject {
|
12
|
+
subject { SincedbRecordSerializer.new(Settings.days_to_seconds(14)) }
|
13
13
|
|
14
14
|
context "deserialize from IO" do
|
15
15
|
it 'reads V1 records' do
|
16
|
-
io.write("
|
16
|
+
io.write("5391297 1 4 12\n")
|
17
|
+
io.rewind
|
18
|
+
rows = 0
|
17
19
|
subject.deserialize(io) do |inode_struct, sincedb_value|
|
18
|
-
expect(inode_struct.inode).to eq("
|
20
|
+
expect(inode_struct.inode).to eq("5391297")
|
19
21
|
expect(inode_struct.maj).to eq(1)
|
20
22
|
expect(inode_struct.min).to eq(4)
|
21
23
|
expect(sincedb_value.position).to eq(12)
|
24
|
+
rows += 1
|
22
25
|
end
|
26
|
+
expect(rows).to be > 0
|
23
27
|
end
|
24
28
|
|
25
29
|
it 'reads V2 records from an IO object' do
|
26
30
|
now = Time.now.to_f
|
27
|
-
io.write("
|
31
|
+
io.write("5391298 1 4 12 #{now} /a/path/to/1.log\n")
|
32
|
+
io.rewind
|
33
|
+
rows = 0
|
28
34
|
subject.deserialize(io) do |inode_struct, sincedb_value|
|
29
|
-
expect(inode_struct.inode).to eq("
|
35
|
+
expect(inode_struct.inode).to eq("5391298")
|
30
36
|
expect(inode_struct.maj).to eq(1)
|
31
37
|
expect(inode_struct.min).to eq(4)
|
32
38
|
expect(sincedb_value.position).to eq(12)
|
33
39
|
expect(sincedb_value.last_changed_at).to eq(now)
|
34
40
|
expect(sincedb_value.path_in_sincedb).to eq("/a/path/to/1.log")
|
41
|
+
rows += 1
|
35
42
|
end
|
43
|
+
expect(rows).to be > 0
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'properly handles spaces in a filename' do
|
47
|
+
now = Time.now.to_f
|
48
|
+
io.write("53912987 1 4 12 #{now} /a/path/to/log log.log\n")
|
49
|
+
io.rewind
|
50
|
+
rows = 0
|
51
|
+
subject.deserialize(io) do |inode_struct, sincedb_value|
|
52
|
+
expect(inode_struct.inode).to eq("53912987")
|
53
|
+
expect(inode_struct.maj).to eq(1)
|
54
|
+
expect(inode_struct.min).to eq(4)
|
55
|
+
expect(sincedb_value.position).to eq(12)
|
56
|
+
expect(sincedb_value.last_changed_at).to eq(now)
|
57
|
+
expect(sincedb_value.path_in_sincedb).to eq("/a/path/to/log log.log")
|
58
|
+
rows += 1
|
59
|
+
end
|
60
|
+
expect(rows).to be > 0
|
36
61
|
end
|
37
62
|
end
|
38
63
|
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|