fluent-plugin-logentries 0.1.0 → 0.1.1

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: 304e80660c778fd1ba5af1aedc391303e8c636d2
4
- data.tar.gz: 74b40205d5f1a62615f8f4baac4edcf651b24c61
3
+ metadata.gz: 54dd09205e71e513063bb8346d512d2bf42477dd
4
+ data.tar.gz: 9a4280574f047836fcb4bf5f6d3ff81cc458c121
5
5
  SHA512:
6
- metadata.gz: 31e7463d16f00ebec9363ac9c7dc3554424d1d956482b089363b57ff5c65d2f385ee82166a82e63ca4ccef709e5eca362229b3b44946996917cad88b4aee9206
7
- data.tar.gz: ca675ab28d20dd044d516912fdaf6e494310241604d7b6342194ac3cbcee90ead7d0490d052738b718cfac7e5014a199e3436561b1b9c398bdeee1f7e4133c8d
6
+ metadata.gz: 3dd6de0d69e28416d7c92fe74e78ee454e798dfdfe3febc23320e92db1187d85f871ec979bae9aceb9c4e96cdbee4d1a3c9c2c8daf7d7b445d6bbb8e8ce70bc1
7
+ data.tar.gz: 874d63485f551b2625bf0cb411c674b3f234d6dc8ef60708622fc6578eab7067f3a02fc9cee5b85a854a543307de9f17d2bfb84024d9242f4373523161f0fb84
@@ -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-logentries"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.1.1"
8
8
  spec.authors = ["Woorank"]
9
9
  spec.email = ["dev@woorank.com"]
10
10
  spec.summary = "Logentries output plugin for Fluent event collector"
@@ -26,7 +26,7 @@ class LogentriesOutput < Fluent::BufferedOutput
26
26
  @_socket ||= TCPSocket.new @host, @port
27
27
  end
28
28
 
29
- # This method is called when an event reaches to Fluentd.
29
+ # This method is called when an event reaches Fluentd.
30
30
  def format(tag, time, record)
31
31
  return [tag, record].to_msgpack
32
32
  end
@@ -44,10 +44,13 @@ class LogentriesOutput < Fluent::BufferedOutput
44
44
  tokens
45
45
  end
46
46
 
47
- # returns the correct token to use for a given tag
48
- def get_token(tag, tokens)
47
+ # returns the correct token to use for a given tag / Records
48
+ def get_token(tag, record, tokens)
49
+ tag ||= ""
50
+ record ||= ""
51
+
49
52
  tokens.each do |key, value|
50
- if tag.index(key) != nil then
53
+ if tag.index(key) != nil || record.index(key) != nil then
51
54
  return value
52
55
  end
53
56
  end
@@ -62,7 +65,7 @@ class LogentriesOutput < Fluent::BufferedOutput
62
65
  chunk.msgpack_each do |tag, record|
63
66
  next unless record.is_a? Hash
64
67
 
65
- token = get_token(tag, tokens)
68
+ token = get_token(tag, record, tokens)
66
69
  next if token.nil?
67
70
 
68
71
  if record.has_key?("message")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-logentries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Woorank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-27 00:00:00.000000000 Z
11
+ date: 2014-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler