fluent-plugin-add 0.0.1 → 0.0.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: 31221f78814f625582ad157fa0a2dd16e5fa0aad
4
- data.tar.gz: c291c3493ff4916127474931979b7db74edf7a20
3
+ metadata.gz: c07c622d7615388bb1d231d36563598500848bfb
4
+ data.tar.gz: 8bdde6e0b38c7184c5ad5b20024d707b3de4bbef
5
5
  SHA512:
6
- metadata.gz: 7c60b974102cb5685af42945cf49a0097b7c57ae52915aaa0af0acc68b296512a2b3ac9296b0050d95c373f1c4eb0ac7a97ce9bf418e360bfbfb83247ce76ae6
7
- data.tar.gz: 360f0840ea337cc19b2317a8b49bb379b2e49f120ebcb8f94f9724dba5d100362751881dd60b650d01df494c694e83bd35dc93d59e7b1bd4ae4542aa189d7a0c
6
+ metadata.gz: a97b9c757f549799731c52b29bee1ce8d31612ef15cdbe694b2c1182a9e6862f358e57b3c60e61b5b044d1172b4c8f418eff1abf4bd13314635335ce200894cf
7
+ data.tar.gz: 8d4fee42405efcd78998de403e99d25c0c210da5e484f9d505565849298141865b51919bc4b0be031c4b25a09866edb5071aa83ced7c05ef0048a1541fbfc95e
data/README.md CHANGED
@@ -1,24 +1,27 @@
1
- # Fluent::Plugin::Add
1
+ # fluent-plugin-add
2
2
 
3
- TODO: Write a gem description
4
3
 
5
4
  ## Installation
6
5
 
7
- Add this line to your application's Gemfile:
8
6
 
9
- gem 'fluent-plugin-add'
7
+ gem install fluent-plugin-add
10
8
 
11
- And then execute:
9
+ ## Configration
12
10
 
13
- $ bundle
11
+ <match test.**>
12
+ type add
13
+ add_tag_prefix debug
14
+ <pair>
15
+ hoge moge
16
+ </pair>
17
+ </match>
14
18
 
15
- Or install it yourself as:
16
19
 
17
- $ gem install fluent-plugin-add
20
+ ### Assuming following inputs are coming:
21
+ test.aa: {"json":"dayo"}
22
+ ### then output bocomes as belows
23
+ debug.test.aa: {"json":"dayo", "hoge":"moge"}
18
24
 
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
25
 
23
26
  ## Contributing
24
27
 
@@ -27,3 +30,6 @@ TODO: Write usage instructions here
27
30
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
31
  4. Push to the branch (`git push origin my-new-feature`)
29
32
  5. Create new Pull Request
33
+
34
+ ## Copyright
35
+ Copyright (c) 2013 yu-yamada
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-add"
8
- spec.version = "0.0.1"
8
+ spec.version = "0.0.2"
9
9
  spec.authors = ["yu yamada"]
10
10
  spec.email = ["yu.yamada@outlook.com"]
11
11
  spec.description = %q{Output filter plugin to count messages that matches specified conditions}
@@ -2,8 +2,6 @@ require 'pp'
2
2
  class Fluent::AddOutput < Fluent::Output
3
3
  Fluent::Plugin.register_output('add', self)
4
4
 
5
- config_param :key, :string
6
- config_param :value, :string, :default => nil
7
5
  config_param :add_tag_prefix, :string, :default => 'greped'
8
6
 
9
7
  def initialize
@@ -13,8 +11,8 @@ class Fluent::AddOutput < Fluent::Output
13
11
  def configure(conf)
14
12
  super
15
13
 
16
- @key = @key.to_s
17
- @value = @value.to_s
14
+ # @key = @key.to_s
15
+ # @value = @value.to_s
18
16
  @tag_prefix = "#{@add_tag_prefix}."
19
17
  @add_hash = Hash.new
20
18
 
@@ -37,7 +35,7 @@ class Fluent::AddOutput < Fluent::Output
37
35
  emit_tag = @tag_proc.call(tag)
38
36
 
39
37
  es.each do |time,record|
40
- record[@key] = @value
38
+ # record[@key] = @value
41
39
  @add_hash.each do |k,v|
42
40
  record[k] = v
43
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-add
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - yu yamada