fluent-plugin-forest 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
  ### ForestOutput
6
6
 
7
7
  ForestOutput creates sub plugin instance of a output plugin dynamically per tag, from template configurations.
8
- In template configurations, you can write configuration lines for overall tags by <template>, and for specified tags by <case TAG_PATTERN>, and you can use \_\_TAG\_\_ placeholder at anywhere in <template> and <case>.
8
+ In template configurations, you can write configuration lines for overall tags by <template>, and for specified tags by <case TAG_PATTERN>, and you can use \_\_TAG\_\_ (or ${tag}) placeholder at anywhere in <template> and <case>.
9
9
 
10
10
  This plugin helps you if you are writing very long configurations by copy&paste with a little little diff for many tags.
11
11
 
12
12
  Other supported placeholders:
13
- * \_\_HOSTNAME\_\_
13
+ * \_\_HOSTNAME\_\_ (or ${hostname})
14
14
  * replaced with string specified by 'hostname' configuration value, or (default) result of 'hostname' command
15
15
 
16
16
  You SHOULD NOT use ForestOutput for tags increasing infinitly.
@@ -56,7 +56,7 @@ You can write configuration with ForestOutput like below:
56
56
  <template>
57
57
  time_slice_format %Y%m%d%H
58
58
  compress yes
59
- path /var/log/__TAG__.*.log
59
+ path /var/log/${tag}.*.log
60
60
  </template>
61
61
  </match>
62
62
 
@@ -103,5 +103,6 @@ If you want to place logs /var/archive for `service.search.**` as filename with
103
103
 
104
104
  ## Copyright
105
105
 
106
- Copyright:: Copyright (c) 2012- TAGOMORI Satoshi (tagomoris)
107
- License:: Apache License, Version 2.0
106
+ * Copyright (c) 2012- TAGOMORI Satoshi (tagomoris)
107
+ * License
108
+ * Apache License, Version 2.0
@@ -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.1"
4
+ gem.version = "0.1.2"
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}
@@ -51,7 +51,7 @@ class Fluent::ForestOutput < Fluent::Output
51
51
  def parameter(tag, e)
52
52
  pairs = {}
53
53
  e.each do |k,v|
54
- pairs[k] = v.gsub('__TAG__', tag).gsub('__HOSTNAME__', @hostname)
54
+ pairs[k] = v.gsub('__TAG__', tag).gsub('${tag}', tag).gsub('__HOSTNAME__', @hostname).gsub('${hostname}', @hostname)
55
55
  end
56
56
  Fluent::Config::Element.new('instance', '', pairs, [])
57
57
  end
@@ -148,7 +148,7 @@ subtype hoge
148
148
  </case>
149
149
  <case *>
150
150
  keyz z3
151
- alt_key d.__TAG__.__HOSTNAME__
151
+ alt_key d.${tag}.${hostname}
152
152
  </case>
153
153
  ]
154
154
  conf = d.instance.spec('xx')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-forest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-19 00:00:00.000000000 Z
12
+ date: 2012-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake