fluent-plugin-stats 0.3.2 → 0.3.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: c448a36c0de1af2d025a96065a51ebbaa29f3a67
4
- data.tar.gz: a5e1b567b9c1d1ba0c2af2bebf3192aa1d001a4e
3
+ metadata.gz: 28926898a6e0a00aad103bafd93aa8372cd22055
4
+ data.tar.gz: 810624bf7e711d5cb30377545c3516edb0c4a5de
5
5
  SHA512:
6
- metadata.gz: d8489b420002f513bca5414625211565e657ee66d0587c2e8280cc5e1b57adf7142aeabd0c5950724b8c2925c1e99ec2f7c1facb38105032fe5dba360da2e91e
7
- data.tar.gz: 294c70be814bde4a92eaf25d385259dbde3b66491bf15560a462b3195bcc7540e11fb43b716d458e1ae296c5bf7004dc180e6c873719120c958232439bb803a3
6
+ metadata.gz: 929e982bb1c14ae5eeb7a8ff26be6196cc002128fd78921e474b9883d842b0d6a2719a6a1b2f6090713c84f252fece52270c0c175ccc4f31efefc02331b24955
7
+ data.tar.gz: 0a9a65241a2b21d2ec3c1267be1e73853c69463085d0fb9ed6c7ea45ba83f766e91910efa39827ea9332bf42e53a07c0fb50c718fe05b999bb0fc49ee15f31a0
@@ -1,3 +1,9 @@
1
+ ## 0.3.3 (2014/02/04)
2
+
3
+ Enhancement:
4
+
5
+ * Support `log_level` option of Fleuntd v0.10.43
6
+
1
7
  ## 0.3.2 (2014/01/24)
2
8
 
3
9
  Fixes
@@ -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-stats"
6
- s.version = "0.3.2"
6
+ s.version = "0.3.3"
7
7
  s.authors = ["Naotoshi Seo"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-stats"
@@ -2,6 +2,11 @@
2
2
  class Fluent::StatsOutput < Fluent::Output
3
3
  Fluent::Plugin.register_output('stats', 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
  def initialize
6
11
  super
7
12
  require 'pathname'
@@ -170,7 +175,7 @@ class Fluent::StatsOutput < Fluent::Output
170
175
 
171
176
  chain.next
172
177
  rescue => e
173
- $log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
178
+ log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
174
179
  end
175
180
 
176
181
  # thread callback
@@ -184,7 +189,7 @@ class Fluent::StatsOutput < Fluent::Output
184
189
  flush_emit
185
190
  end
186
191
  rescue => e
187
- $log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
192
+ log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
188
193
  end
189
194
  end
190
195
  end
@@ -255,7 +260,7 @@ class Fluent::StatsOutput < Fluent::Output
255
260
  }, f)
256
261
  end
257
262
  rescue => e
258
- $log.warn "out_stats: Can't write store_file #{e.class} #{e.message}"
263
+ log.warn "out_stats: Can't write store_file #{e.class} #{e.message}"
259
264
  end
260
265
  end
261
266
 
@@ -276,7 +281,7 @@ class Fluent::StatsOutput < Fluent::Output
276
281
  stored[:avg] == @avg
277
282
 
278
283
  if !stored[:matches].empty? and !stored[:matches].first[1].has_key?(:max)
279
- $log.warn "out_stats: stored data does not have compatibility with the current version. ignore stored data"
284
+ log.warn "out_stats: stored data does not have compatibility with the current version. ignore stored data"
280
285
  return
281
286
  end
282
287
 
@@ -292,14 +297,14 @@ class Fluent::StatsOutput < Fluent::Output
292
297
  # skip the saved duration to continue counting
293
298
  @last_checked = Fluent::Engine.now - @saved_duration
294
299
  else
295
- $log.warn "out_stats: stored data is outdated. ignore stored data"
300
+ log.warn "out_stats: stored data is outdated. ignore stored data"
296
301
  end
297
302
  else
298
- $log.warn "out_stats: configuration param was changed. ignore stored data"
303
+ log.warn "out_stats: configuration param was changed. ignore stored data"
299
304
  end
300
305
  end
301
306
  rescue => e
302
- $log.warn "out_stats: Can't load store_file #{e.class} #{e.message}"
307
+ log.warn "out_stats: Can't load store_file #{e.class} #{e.message}"
303
308
  end
304
309
  end
305
310
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-23 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