fluent-plugin-to_s 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-to_s.gemspec +1 -1
- data/lib/fluent/plugin/out_to_s.rb +2 -10
- data/test/plugin/test_out_to_s.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edff74b8ca5f4537fb608953edbcfca640ddefb
|
4
|
+
data.tar.gz: 73ba883176ee10e1cbcdcc8f4fbdef66483bbf2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e71f0aff30d3f4af313d033a3505930b12db18cee3bf60c9cdd6a55461764832c4d36eaa101e2740c93fd1214f7c35f72dca6f63efe1fe490e378ec2d310b33
|
7
|
+
data.tar.gz: 0a25110397d8bade8f1c3eb8dbb5fd1452fe2a915937b415633966d6cc3a38795dc6faa0082e8330a5f7d7bcfcd6e663396163ad52e4032338cac1be4da8c090
|
data/fluent-plugin-to_s.gemspec
CHANGED
@@ -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-to_s"
|
8
|
-
spec.version = "0.0.
|
8
|
+
spec.version = "0.0.3"
|
9
9
|
spec.authors = ["airtoxin"]
|
10
10
|
spec.email = ["airtoxin@icloud.com"]
|
11
11
|
spec.description = %q{Plugin that adds whole record to to_s field}
|
@@ -1,21 +1,13 @@
|
|
1
1
|
class Fluent::ToSOutput < Fluent::Output
|
2
2
|
Fluent::Plugin.register_output('to_s', self)
|
3
3
|
|
4
|
-
config_param :tag_prefix, :string, :default => ''
|
4
|
+
config_param :tag_prefix, :string, :default => 'to_s'
|
5
5
|
config_param :field_name, :string, :default => 'to_s'
|
6
6
|
|
7
7
|
def configure(conf)
|
8
8
|
super
|
9
9
|
|
10
|
-
@
|
11
|
-
@tag_proc =
|
12
|
-
if !@tag_prefix.empty?
|
13
|
-
Proc.new {|tag| "#{@prefix}#{tag}"}
|
14
|
-
else
|
15
|
-
Proc.new {|tag| tag}
|
16
|
-
end
|
17
|
-
@to_s =
|
18
|
-
Proc.new {|record| record.to_s}
|
10
|
+
@tag_proc = Proc.new {|tag| "#{@tag_prefix}.#{tag}"}
|
19
11
|
end
|
20
12
|
|
21
13
|
def emit(tag, es, chain)
|