fluent-plugin-grepcounter 0.5.1 → 0.5.2

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: 325a34b1806a1a3513714f45dcda6108b12557cf
4
- data.tar.gz: 91bd55d9a23ed982b33374d85e0c82dac847f950
3
+ metadata.gz: 3a3f68aa7d961b029edcb310440dafcc74f4e27c
4
+ data.tar.gz: 685ed1187c0349c9980077cf843e8cdd37627973
5
5
  SHA512:
6
- metadata.gz: 47b1bb4b4fddc06f4ee13740dee2e3b4a930c96221946fc9d36b68b2efb3c77b9dce7571b0cc678621cbb60f5f4e45382de848fcf23db51b020d68c078aa7eb7
7
- data.tar.gz: b627c1fccda47489e1f59f9a84c35c65b8370af1930eaf71fbf40b63e0332c7ce13265d2c92406a69a98c450b61a87f73389a33d7243ebaa95429917bf34f348
6
+ metadata.gz: 2bd4ac357031dae5ab89d58e1ed35c90722cfa0fb2f64aab213a4c6d286956bea5bb0ef58a081eccf7bee797dd89a05738ceb26a25802cb1766650e83c57d926
7
+ data.tar.gz: 52505feb90d47a807b645e86fbce71c3383faec26d0a01d1832c462ab4b8886b297d607a78d7d20b2d0732107d824558eb684a1f953b1b837d1d790742362080
@@ -1,3 +1,9 @@
1
+ ## 0.5.2 (2014/02/04)
2
+
3
+ Enhancement:
4
+
5
+ * Support `log_level` option of Fleuntd v0.10.43
6
+
1
7
  ## 0.5.1 (2013/12/28)
2
8
 
3
9
  Changes
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-grepcounter"
6
- s.version = "0.5.1"
6
+ s.version = "0.5.2"
7
7
  s.authors = ["Naotoshi Seo"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-grepcounter"
@@ -2,6 +2,11 @@
2
2
  class Fluent::GrepCounterOutput < Fluent::Output
3
3
  Fluent::Plugin.register_output('grepcounter', self)
4
4
 
5
+ # To support log_level option implemented by Fluentd v0.10.43
6
+ unless method_defined?(:log)
7
+ define_method("log") { $log }
8
+ end
9
+
5
10
  REGEXP_MAX_NUM = 20
6
11
 
7
12
  def initialize
@@ -172,7 +177,7 @@ class Fluent::GrepCounterOutput < Fluent::Output
172
177
 
173
178
  chain.next
174
179
  rescue => e
175
- $log.warn "grepcounter: #{e.class} #{e.message} #{e.backtrace.first}"
180
+ log.warn "grepcounter: #{e.class} #{e.message} #{e.backtrace.first}"
176
181
  end
177
182
 
178
183
  # thread callback
@@ -188,7 +193,7 @@ class Fluent::GrepCounterOutput < Fluent::Output
188
193
  @last_checked = now
189
194
  end
190
195
  rescue => e
191
- $log.warn "grepcounter: #{e.class} #{e.message} #{e.backtrace.first}"
196
+ log.warn "grepcounter: #{e.class} #{e.message} #{e.backtrace.first}"
192
197
  end
193
198
  end
194
199
  end
@@ -281,7 +286,7 @@ class Fluent::GrepCounterOutput < Fluent::Output
281
286
  }, f)
282
287
  end
283
288
  rescue => e
284
- $log.warn "out_grepcounter: Can't write store_file #{e.class} #{e.message}"
289
+ log.warn "out_grepcounter: Can't write store_file #{e.class} #{e.message}"
285
290
  end
286
291
  end
287
292
 
@@ -307,14 +312,14 @@ class Fluent::GrepCounterOutput < Fluent::Output
307
312
  # skip the saved duration to continue counting
308
313
  @last_checked = Fluent::Engine.now - @saved_duration
309
314
  else
310
- $log.warn "out_grepcounter: stored data is outdated. ignore stored data"
315
+ log.warn "out_grepcounter: stored data is outdated. ignore stored data"
311
316
  end
312
317
  else
313
- $log.warn "out_grepcounter: configuration param was changed. ignore stored data"
318
+ log.warn "out_grepcounter: configuration param was changed. ignore stored data"
314
319
  end
315
320
  end
316
321
  rescue => e
317
- $log.warn "out_grepcounter: Can't load store_file #{e.class} #{e.message}"
322
+ log.warn "out_grepcounter: Can't load store_file #{e.class} #{e.message}"
318
323
  end
319
324
  end
320
325
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-grepcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd