fluent-plugin-formatter_simple_tsv 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/README.md +9 -0
- data/fluent-plugin-formatter_simple_tsv.gemspec +2 -2
- data/lib/fluent/plugin/formatter_simple_tsv.rb +5 -7
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f4330d2f5b3803d329c95c7cb1b3ce2c7e65638
|
4
|
+
data.tar.gz: 7be139f997c71b1dcada76aa0499567e5b5c2c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9836dbf4f6396a1eb73b1c831ce37790940c03741879930b23f95b37f345179b6dcb6414d807b397552a25f5b4eb86af6a52238f556b0893975716d14ef9d20
|
7
|
+
data.tar.gz: 97aca25bd1f23c16f593b1840aa9ac56b8848e35d32050841446015a02689abcd6554fafec63b70aaa32d771f8c9fc8c7d096b21c884862e64dc6172b784e9dc
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,15 @@
|
|
4
4
|
|
5
5
|
Fluentd Simple TSV formatter plugin
|
6
6
|
|
7
|
+
## Notice
|
8
|
+
|
9
|
+
0.1.0 had been dropped support Fluentd v0.12.
|
10
|
+
If you want to use this plugin with Fluentd v0.12, please add version constraint in your Gemfile like as:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem "fluent-plugin-formatter_simple_tsv", "~> 0.0.3"
|
14
|
+
```
|
15
|
+
|
7
16
|
## Installation
|
8
17
|
|
9
18
|
Add this line to your application's Gemfile:
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-formatter_simple_tsv"
|
7
|
-
spec.version = "0.0
|
7
|
+
spec.version = "0.1.0"
|
8
8
|
spec.authors = ["Hiroshi Hatake"]
|
9
9
|
spec.email = ["cosmo0920.oucc@gmail.com"]
|
10
10
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency "fluentd", "
|
21
|
+
spec.add_runtime_dependency "fluentd", [">= 0.14.6", "< 2"]
|
22
22
|
spec.add_development_dependency "bundler"
|
23
23
|
spec.add_development_dependency "rake"
|
24
24
|
spec.add_development_dependency "test-unit", ">= 3.1.0"
|
@@ -1,10 +1,9 @@
|
|
1
|
+
require 'fluent/plugin/formatter'
|
2
|
+
|
1
3
|
module Fluent
|
2
|
-
module
|
4
|
+
module Plugin
|
3
5
|
class SimpleTsvFormatter < Formatter
|
4
|
-
Plugin.register_formatter('simple_tsv', self)
|
5
|
-
|
6
|
-
include Configurable
|
7
|
-
include HandleTagAndTimeMixin
|
6
|
+
Fluent::Plugin.register_formatter('simple_tsv', self)
|
8
7
|
|
9
8
|
config_param :keys, :default => [] do |val|
|
10
9
|
val.split(',')
|
@@ -14,7 +13,7 @@ module Fluent
|
|
14
13
|
super
|
15
14
|
|
16
15
|
if @keys.empty?
|
17
|
-
raise ConfigError, "keys option is required on simple_tsv formatter"
|
16
|
+
raise Fluent::ConfigError, "keys option is required on simple_tsv formatter"
|
18
17
|
end
|
19
18
|
end
|
20
19
|
|
@@ -22,7 +21,6 @@ module Fluent
|
|
22
21
|
selected = record.select {|key, val|
|
23
22
|
@keys.include?(key)
|
24
23
|
}
|
25
|
-
filter_record(tag, time, selected)
|
26
24
|
formatted = selected.inject('') { |result, pair|
|
27
25
|
result << "\t" if result.length.nonzero?
|
28
26
|
result << "#{pair.last}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-formatter_simple_tsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
@@ -14,16 +14,22 @@ dependencies:
|
|
14
14
|
name: fluentd
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.14.6
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.14.6
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|