logstash-input-varnishncsa 2.0.4 → 2.0.5

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: 79a2d4441ca61888ccbfa26982d8012a7a11de38
4
- data.tar.gz: 66fbb34c63090386a582d76327d6ce5230f6e28c
3
+ metadata.gz: 29b000ebfd65182bdb1cea288aa8ffd26fe4e553
4
+ data.tar.gz: 1d6f137b024ba3e18442c02061cb31c25f2e7037
5
5
  SHA512:
6
- metadata.gz: ac7792a0a0fec07147f6475ec82f67ee4c386abfb280a2d033e95b8824e63ddb8844ea8ceaf0146d375f116fd5acb75df0bab731af06f48f6a25859de2f09b93
7
- data.tar.gz: d4790aab5a747d043194b53637c0fb744ea019f3854de7ce2475ba5d08d57bf917138cac5b8dcda561e1033c1f6dbf20fc3664f2365f6e687bc2bdac41e2c016
6
+ metadata.gz: 5c9f08277f1fd300d3b7e9e3ca1f0244f35ef750a3fdb5ba574a1b912c5b994c61fb585b62df09af1cd4a0c3f75b18cfd9c0af25c765f179a1b023449fa789e7
7
+ data.tar.gz: ba3422b26b598c29f9f880d4bbea76be51fc8dbd31b27aa6d020159a51afccd56ec4408751bd9e9830fbb092b00bedbbdc8a1d4489d370deb0c124aa0078b112
@@ -10,8 +10,6 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
10
10
 
11
11
  config :instance, :validate => :string, :default => "default"
12
12
 
13
- trap("SIGINT") { @@reopen = 1}
14
-
15
13
  Logline = Struct.new(
16
14
  :df_H, # %H, Protocol version
17
15
  :df_U, # %U, URL path
@@ -54,10 +52,11 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
54
52
  end # def register
55
53
 
56
54
  def run(queue)
57
- @q = queue
58
- @hostname = Socket.gethostname
59
- # callback = Proc.new { |*args| h_ncsa(*args) }
60
- Varnish::VSL.VSL_Dispatch(@vd, self.method(:h_ncsa).to_proc, FFI::MemoryPointer.new(:pointer))
55
+ while !stop? do
56
+ @q = queue
57
+ @hostname = Socket.gethostname
58
+ Varnish::VSL.VSL_Dispatch(@vd, self.method(:h_ncsa).to_proc, FFI::MemoryPointer.new(:pointer))
59
+ end
61
60
  end # def run
62
61
 
63
62
  private
@@ -263,8 +262,10 @@ class LogStash::Inputs::Varnishncsa < LogStash::Inputs::Threadable
263
262
  begin
264
263
  str = ptr.read_string(len)
265
264
  if spec == :spec_client
265
+ @logger.debug('Collect client')
266
266
  collect_client(tag, str)
267
267
  elsif spec == :spec_backend
268
+ @logger.debug('collect backend')
268
269
  collect_backend(tag, str)
269
270
  else
270
271
  return @@reopen
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-varnishncsa'
4
- s.version = '2.0.4'
4
+ s.version = '2.0.5'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read from varnish cache's shared memory log and return all value in a logstash field (rewrite of varnishlog in ruby)"
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/plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-varnishncsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - hans moulron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-20 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core