fluent-plugin-forest 0.1.1 → 0.1.2
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.
- data/README.md +6 -5
- data/fluent-plugin-forest.gemspec +1 -1
- data/lib/fluent/plugin/out_forest.rb +1 -1
- data/test/plugin/test_out_forest.rb +1 -1
- metadata +2 -2
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
|
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
|
-
|
107
|
-
|
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.
|
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
|
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.
|
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-
|
12
|
+
date: 2012-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|