fluent-plugin-forest 0.1.3 → 0.1.4

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 64c115e1a16dd698ed72620f85092fdf2ffa2df6
4
+ data.tar.gz: add9f6483e7b64610f4c1b768e385738c2edaf82
5
+ SHA512:
6
+ metadata.gz: 4ec2639b99f43aca4d7d69f669d823e4637d679b3168e3165d130da51c1ac50deca7964ee81390e3d99f05817e099f5563a2f2f322651256ca6979b66310ad25
7
+ data.tar.gz: 26f9b84fcad4872df358b580ef5deba7cf5705037b1d0931dc42f6b0a13e5706abc135cb4cd9d0d4983130e7c12b8ddbdce8bd2fef65cdb9d11ca26e1ec3df65
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-forest"
4
- gem.version = "0.1.3"
4
+ gem.version = "0.1.4"
5
5
  gem.authors = ["TAGOMORI Satoshi"]
6
6
  gem.email = ["tagomoris@gmail.com"]
7
7
  gem.description = %q{create sub-plugin dynamically per tags, with template configuration and parameters}
@@ -1,4 +1,4 @@
1
- class Fluent::ForestOutput < Fluent::Output
1
+ class Fluent::ForestOutput < Fluent::MultiOutput
2
2
  Fluent::Plugin.register_output('forest', self)
3
3
 
4
4
  config_param :subtype, :string
@@ -6,6 +6,8 @@ class Fluent::ForestOutput < Fluent::Output
6
6
  config_param :add_prefix, :string, :default => nil
7
7
  config_param :hostname, :string, :default => `hostname`.chomp
8
8
 
9
+ attr_reader :outputs
10
+
9
11
  def configure(conf)
10
12
  super
11
13
 
@@ -18,6 +20,7 @@ class Fluent::ForestOutput < Fluent::Output
18
20
  end
19
21
 
20
22
  @mapping = {} # tag => output
23
+ @outputs = []
21
24
  @mutex = Mutex.new
22
25
 
23
26
  @template = nil
@@ -78,6 +81,7 @@ class Fluent::ForestOutput < Fluent::Output
78
81
  output.configure(spec(tag))
79
82
  output.start
80
83
  @mapping[tag] = output
84
+ @outputs.push(output)
81
85
  end
82
86
  }
83
87
  $log.info "out_forest plants new output: #{@subtype} for tag '#{tag}'"
@@ -99,7 +103,7 @@ class Fluent::ForestOutput < Fluent::Output
99
103
  if @remove_prefix and
100
104
  ( (tag.start_with?(@removed_prefix_string) and tag.length > @removed_length) or tag == @remove_prefix)
101
105
  tag = tag[@removed_length..-1]
102
- end
106
+ end
103
107
  if @add_prefix
104
108
  tag = if tag.length > 0
105
109
  @added_prefix_string + tag
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-forest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - TAGOMORI Satoshi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
11
+ date: 2013-04-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: fluentd
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: create sub-plugin dynamically per tags, with template configuration and
@@ -64,27 +59,26 @@ files:
64
59
  - test/plugin/test_out_forest_test.rb
65
60
  homepage: https://github.com/tagomoris/fluent-plugin-forest
66
61
  licenses: []
62
+ metadata: {}
67
63
  post_install_message:
68
64
  rdoc_options: []
69
65
  require_paths:
70
66
  - lib
71
67
  required_ruby_version: !ruby/object:Gem::Requirement
72
- none: false
73
68
  requirements:
74
- - - ! '>='
69
+ - - '>='
75
70
  - !ruby/object:Gem::Version
76
71
  version: '0'
77
72
  required_rubygems_version: !ruby/object:Gem::Requirement
78
- none: false
79
73
  requirements:
80
- - - ! '>='
74
+ - - '>='
81
75
  - !ruby/object:Gem::Version
82
76
  version: '0'
83
77
  requirements: []
84
78
  rubyforge_project:
85
- rubygems_version: 1.8.23
79
+ rubygems_version: 2.0.0
86
80
  signing_key:
87
- specification_version: 3
81
+ specification_version: 4
88
82
  summary: plugin to create output plugin instances per tags dynamically
89
83
  test_files:
90
84
  - test/helper.rb