fluent-plugin-systemd 0.1.1.pre2 → 0.1.1.pre3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06173525ce5daf2305a6e8352543341fa6f2b867
4
- data.tar.gz: 2f0fa5c0cff5ed770b701ca8bc03c9fa134c329f
3
+ metadata.gz: 4a98a79b5d7bfa6dde174c9c0d8352407b07d37d
4
+ data.tar.gz: f6ddce5e5522d96460b4794fe1646bcc6f7837a2
5
5
  SHA512:
6
- metadata.gz: 5524d80e7383e20794b11e9a6afb86a066c4883fb5d6f57a026c61f677cce9e3f3e1ac8e67179b95c0b6f319638cb64c29f01e7b0c08afeca0e76e2feaaee683
7
- data.tar.gz: 914c570e27ed1d95e29bb96ee0ff78dd54bda56aad5ee96e236eb5c4db49a586ffa0394c7ea4baeebe7c3dad906054bbd5ea5725d3d917ff9e9994edf09bb493
6
+ metadata.gz: 378a0319305a350c770213d8090550bd808f664bef08766bb2bc0c03bcb69e3aad0244d5246f99feba606ae0159dcb32f579f43a673d5dc435cdcf77f199462f
7
+ data.tar.gz: 296c1f33d19d5c4adcd68354330bb1f8ca9c13e0d16b128c1828a8d252f2aea3b2f1300689a83d607212a527d0681579f5ba052e0b43b63aa010e844bfdaa125
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-systemd (0.1.1.pre2)
4
+ fluent-plugin-systemd (0.1.1.pre3)
5
5
  fluentd (>= 0.14.11, < 2)
6
6
  systemd-journal (~> 1.2)
7
7
 
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-systemd"
8
- spec.version = "0.1.1.pre2"
8
+ spec.version = "0.1.1.pre3"
9
9
  spec.authors = ["Ed Robinson"]
10
10
  spec.email = ["ed@reevoo.com"]
11
11
 
@@ -19,6 +19,7 @@ module Fluent
19
19
  def configure(conf)
20
20
  super
21
21
  @pos_writer = PosWriter.new(@pos_file)
22
+ init_journal
22
23
  end
23
24
 
24
25
  def start
@@ -36,6 +37,9 @@ module Fluent
36
37
 
37
38
  def init_journal
38
39
  @journal = Systemd::Journal.new(path: @path)
40
+ # make sure initial call to wait doesn't return :invalidate
41
+ # see https://github.com/ledbettj/systemd-journal/issues/70
42
+ @journal.wait(0)
39
43
  @journal.filter(*@filters)
40
44
  seek
41
45
  end
@@ -66,8 +70,7 @@ module Fluent
66
70
  end
67
71
 
68
72
  def run
69
- init_journal
70
- Thread.current.abort_on_exception = true
73
+ init_journal if @journal.wait(0) == :invalidate
71
74
  watch do |entry|
72
75
  begin
73
76
  router.emit(@tag, Fluent::EventTime.from_time(entry.realtime_timestamp), formatted(entry))
@@ -75,7 +78,6 @@ module Fluent
75
78
  log.error("Exception emitting record: #{e}")
76
79
  end
77
80
  end
78
- @pos_writer.sync
79
81
  end
80
82
 
81
83
  def formatted(entry)
@@ -27,10 +27,6 @@ module Fluent
27
27
  write_pos
28
28
  end
29
29
 
30
- def sync
31
- write_pos
32
- end
33
-
34
30
  def update(c)
35
31
  return unless @path
36
32
  @lock.synchronize { @cursor = c }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-systemd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.pre2
4
+ version: 0.1.1.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Robinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -121,6 +121,7 @@ files:
121
121
  - pkg/fluent-plugin-systemd-0.0.6.gem
122
122
  - pkg/fluent-plugin-systemd-0.1.0.gem
123
123
  - pkg/fluent-plugin-systemd-0.1.1.pre.gem
124
+ - pkg/fluent-plugin-systemd-0.1.1.pre2.gem
124
125
  homepage: https://github.com/reevoo/fluent-plugin-systemd
125
126
  licenses:
126
127
  - MIT