fluent-plugin-split 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2889b1272cbbee83372b3376b22e17f5fbe897a
4
- data.tar.gz: efdec127d0aeb986b9eb11913d6867a23fb85a8a
3
+ metadata.gz: f8366392d23a53164997a3121b140e32406ca732
4
+ data.tar.gz: f5aeab4a8423c52a54ffed4630e81b8c420631b7
5
5
  SHA512:
6
- metadata.gz: 9a3291b5e20dc73a21e8212abdfebd020d812fdb77f44b7b09763ced5c4d3789a63eeed10c9767a3b3a8d065fedb63423bcfeb05c26bc975a4694076e262217c
7
- data.tar.gz: 327798f399b83279ae02d70f437688680f4ae69bcfdd822e9ea560c190b5e83aee195a2b12a3f185ba7b73450b29f20466ed6e32f82fc21ded655b6684efff18
6
+ metadata.gz: 67f5b41fdc9f3ecb818f0544a19fa1b0c249dfde04c5003477d82a12ba61147deb3881f42dcb5420bf7392f22d9b8201f99791bd9298b21023a7c9f493214a97
7
+ data.tar.gz: 7f661bef25beb83b9769238dfaf8c5d4329923f76922c1ae7e4c1593e4079d051e89f63e04cbd454e676cf67179ec1237c62bc22114f1207a1aa9f625280040d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.0.2 (2014/01/02)
2
+
3
+ * double-byte space respond
4
+ * bug fix
5
+
1
6
  ## 0.0.1 (2014/01/02)
2
7
 
3
8
  First release
data/README.md CHANGED
@@ -4,10 +4,18 @@ Output Split String Plugin for fluentd
4
4
 
5
5
  ## Installation
6
6
 
7
- Use RubyGems:
7
+ ### td-agent(Linux)
8
8
 
9
9
  /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-split
10
10
 
11
+ ### td-agent(Mac)
12
+
13
+ sudo /usr/local/Cellar/td-agent/1.1.XX/bin/fluent-gem install fluent-plugin-split
14
+
15
+ ### fluentd only
16
+
17
+ gem install fluent-plugin-split
18
+
11
19
 
12
20
  ## parameter
13
21
 
@@ -23,7 +31,7 @@ keep_keys|keep keys(comma separator)
23
31
 
24
32
  Example:
25
33
 
26
- <match tag>
34
+ <match foo.bar>
27
35
  type split
28
36
  output_tag split.keyword
29
37
  output_key keyword
@@ -41,9 +49,9 @@ foo.bar {"keywords"=>"keyword1,keyword2,keyword3", "site" => "google", "user_id"
41
49
  then output becomes as below (indented):
42
50
 
43
51
  ```js
44
- split.keyword { "keyword":"keyword1", "site" => "google"}
45
- split.keyword { "keyword":"keyword2", "site" => "google"}
46
- split.keyword { "keyword":"keyword3", "site" => "google"}
52
+ split.keyword { "keyword" => "keyword1", "site" => "google"}
53
+ split.keyword { "keyword" => "keyword2", "site" => "google"}
54
+ split.keyword { "keyword" => "keyword3", "site" => "google"}
47
55
  ```
48
56
 
49
57
  ## ChangeLog
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-split"
6
- gem.version = "0.0.1"
6
+ gem.version = "0.0.2"
7
7
  gem.authors = ["Hiroshi Toyama"]
8
8
  gem.email = "toyama0919@gmail.com"
9
9
  gem.homepage = "https://github.com/toyama0919/fluent-plugin-split"
@@ -20,7 +20,7 @@ module Fluent
20
20
  elsif @format == "tsv"
21
21
  @separator = '\t'
22
22
  elsif @format == "space"
23
- @separator = ' '
23
+ @separator = /[\s ]/
24
24
  else
25
25
  @separator = @format
26
26
  end
@@ -28,6 +28,7 @@ module Fluent
28
28
 
29
29
  def emit(tag, es, chain)
30
30
  es.each { |time, record|
31
+ next if record[@key_name].nil?
31
32
  record[@key_name].split(@separator).each{|item|
32
33
  result = {@output_key => item}
33
34
  record.each {|key,value|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-split
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Toyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-01 00:00:00.000000000 Z
11
+ date: 2014-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd