fluent-plugin-flowcounter-simple 0.0.2 → 0.0.3
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/fluent-plugin-flowcounter-simple.gemspec +1 -1
- data/lib/fluent/plugin/out_flowcounter_simple.rb +6 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6068639d44bb2bd1f48f368276c79218b37df9d0
|
4
|
+
data.tar.gz: 676f07aef67aaa0a1be88317bf4f7db75768ce48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a276cb04edb29041e5c1b361176c8e12c3c37c8d3f06ee6d5666eb7c8ce7249028481e90777573197a22d5323f68869232bf7fa55ad585806f4611f9cc2ee862
|
7
|
+
data.tar.gz: 05ee368bb3ee9e36a1fe5cd696d51ef1df983f5ba5b26234bb941a49f21ee3a4aa285ede7ae8866e9dead52b14d2926321397b1863887941f8630bf0eadc59d2
|
data/CHANGELOG.md
ADDED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-flowcounter-simple"
|
4
|
-
gem.version = "0.0.
|
4
|
+
gem.version = "0.0.3"
|
5
5
|
gem.authors = ["Naotoshi Seo"]
|
6
6
|
gem.email = ["sonots@gmail.com"]
|
7
7
|
gem.summary = %q{Simple Fluentd Plugin to count number of messages and outputs to log}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
class Fluent::FlowCounterSimpleOutput < Fluent::Output
|
2
2
|
Fluent::Plugin.register_output('flowcounter_simple', self)
|
3
3
|
|
4
|
+
# To support log_level option implemented by Fluentd v0.10.43
|
5
|
+
unless method_defined?(:log)
|
6
|
+
define_method("log") { $log }
|
7
|
+
end
|
8
|
+
|
4
9
|
config_param :indicator, :string, :default => 'num'
|
5
10
|
config_param :unit, :string, :default => 'second'
|
6
11
|
config_param :comment, :string, :default => nil
|
@@ -67,7 +72,7 @@ class Fluent::FlowCounterSimpleOutput < Fluent::Output
|
|
67
72
|
def flush_emit(step)
|
68
73
|
count, @count = @count, 0
|
69
74
|
if count > 0
|
70
|
-
|
75
|
+
log.info @output_proc.call(count)
|
71
76
|
end
|
72
77
|
end
|
73
78
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-flowcounter-simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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-
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- .gitignore
|
77
77
|
- .travis.yml
|
78
|
+
- CHANGELOG.md
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE.txt
|
80
81
|
- README.md
|