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 +4 -4
- data/CHANGELOG.md +6 -0
- data/fluent-plugin-grepcounter.gemspec +1 -1
- data/lib/fluent/plugin/out_grepcounter.rb +11 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a3f68aa7d961b029edcb310440dafcc74f4e27c
|
4
|
+
data.tar.gz: 685ed1187c0349c9980077cf843e8cdd37627973
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bd4ac357031dae5ab89d58e1ed35c90722cfa0fb2f64aab213a4c6d286956bea5bb0ef58a081eccf7bee797dd89a05738ceb26a25802cb1766650e83c57d926
|
7
|
+
data.tar.gz: 52505feb90d47a807b645e86fbce71c3383faec26d0a01d1832c462ab4b8886b297d607a78d7d20b2d0732107d824558eb684a1f953b1b837d1d790742362080
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
315
|
+
log.warn "out_grepcounter: stored data is outdated. ignore stored data"
|
311
316
|
end
|
312
317
|
else
|
313
|
-
|
318
|
+
log.warn "out_grepcounter: configuration param was changed. ignore stored data"
|
314
319
|
end
|
315
320
|
end
|
316
321
|
rescue => e
|
317
|
-
|
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.
|
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:
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|