fluent-plugin-datacounter 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a2ccf7898022261c52e17eb5aa9375df17fcac1
4
- data.tar.gz: 19dbfaf01f24fe21fcfc76429d9be3c77d3c4167
3
+ metadata.gz: 1b4d91d5c90fe127587b87a6422a51c7615d4d35
4
+ data.tar.gz: 44286a9f86f2d5261090a4757abe2e5c5ca5bca1
5
5
  SHA512:
6
- metadata.gz: 4739c24aabcd790e73038e60956a9bc7fdd00434d910f07e2f6cfbe55b28790fbc1859fd2027c9a8d01c9170f040726c1bdbb8fd394b6d38b6e57582d9011c46
7
- data.tar.gz: 14729172930a3b75453916c757c2be4415f428a372bdce4c1ae0120152389b7e845bdc942b06f48f5c9848eaa4045799f918a7884504ce67554f9c7abefd5d37
6
+ metadata.gz: a6f91229701fe9beb94961b5e080669a93d742aa870e50f776fcef86a0c7f9575be603524bbc44c5f6c9a8a09395eb4b1bfa0d42d33af34c00a7891b5b0a98f9
7
+ data.tar.gz: 190f1d713ba82566fb9ac4d8d47c944daf84e40d86abc8969158a0cfbb72e31e32d90f6397512875b119541c0b4f10b2bcd1c9ffa113073909840fab65b08f94
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # fluent-plugin-datacounter
2
2
 
3
+ This is a plugin for [Fluentd](http://fluentd.org)
4
+
3
5
  ## Component
4
6
 
5
7
  ### DataCounterOutput
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-datacounter"
4
- gem.version = "0.4.2"
4
+ gem.version = "0.4.3"
5
5
  gem.authors = ["TAGOMORI Satoshi"]
6
6
  gem.email = ["tagomoris@gmail.com"]
7
7
  gem.homepage = "https://github.com/tagomoris/fluent-plugin-datacounter"
@@ -1,6 +1,11 @@
1
1
  class Fluent::DataCounterOutput < Fluent::Output
2
2
  Fluent::Plugin.register_output('datacounter', self)
3
3
 
4
+ # Define `log` method for v0.10.42 or earlier
5
+ unless method_defined?(:log)
6
+ define_method("log") { $log }
7
+ end
8
+
4
9
  def initialize
5
10
  super
6
11
  require 'pathname'
@@ -60,7 +65,7 @@ class Fluent::DataCounterOutput < Fluent::Output
60
65
  pattern_keys = conf.keys.select{|k| k =~ /^pattern(\d+)$/}
61
66
  invalids = pattern_keys.select{|arg| arg =~ /^pattern(\d+)/ and not (1..PATTERN_MAX_NUM).include?($1.to_i)}
62
67
  if invalids.size > 0
63
- $log.warn "invalid number patterns (valid pattern number:1-20):" + invalids.join(",")
68
+ log.warn "invalid number patterns (valid pattern number:1-20):" + invalids.join(",")
64
69
  end
65
70
  (1..PATTERN_MAX_NUM).each do |i|
66
71
  next unless conf["pattern#{i}"]
@@ -278,7 +283,7 @@ class Fluent::DataCounterOutput < Fluent::Output
278
283
  }, f)
279
284
  end
280
285
  rescue => e
281
- $log.warn "out_datacounter: Can't write store_file #{e.class} #{e.message}"
286
+ log.warn "out_datacounter: Can't write store_file #{e.class} #{e.message}"
282
287
  end
283
288
  end
284
289
 
@@ -304,14 +309,14 @@ class Fluent::DataCounterOutput < Fluent::Output
304
309
  # skip the saved duration to continue counting
305
310
  @last_checked = Fluent::Engine.now - @saved_duration
306
311
  else
307
- $log.warn "out_datacounter: stored data is outdated. ignore stored data"
312
+ log.warn "out_datacounter: stored data is outdated. ignore stored data"
308
313
  end
309
314
  else
310
- $log.warn "out_datacounter: configuration param was changed. ignore stored data"
315
+ log.warn "out_datacounter: configuration param was changed. ignore stored data"
311
316
  end
312
317
  end
313
318
  rescue => e
314
- $log.warn "out_datacounter: Can't load store_file #{e.class} #{e.message}"
319
+ log.warn "out_datacounter: Can't load store_file #{e.class} #{e.message}"
315
320
  end
316
321
  end
317
322
 
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-datacounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-27 00:00:00.000000000 Z
11
+ date: 2014-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: delorean
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: To count records with string fields by regexps (To count records with
@@ -74,7 +74,8 @@ executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .gitignore
77
+ - ".gitignore"
78
+ - ".travis.yml"
78
79
  - Gemfile
79
80
  - LICENSE.txt
80
81
  - README.md
@@ -94,21 +95,20 @@ require_paths:
94
95
  - lib
95
96
  required_ruby_version: !ruby/object:Gem::Requirement
96
97
  requirements:
97
- - - '>='
98
+ - - ">="
98
99
  - !ruby/object:Gem::Version
99
100
  version: '0'
100
101
  required_rubygems_version: !ruby/object:Gem::Requirement
101
102
  requirements:
102
- - - '>='
103
+ - - ">="
103
104
  - !ruby/object:Gem::Version
104
105
  version: '0'
105
106
  requirements: []
106
107
  rubyforge_project:
107
- rubygems_version: 2.0.3
108
+ rubygems_version: 2.2.2
108
109
  signing_key:
109
110
  specification_version: 4
110
111
  summary: Fluentd plugin to count records with specified regexp patterns
111
112
  test_files:
112
113
  - test/helper.rb
113
114
  - test/plugin/test_out_datacounter.rb
114
- has_rdoc: