fluent-plugin-logentries-tmpfix 0.2.12 → 0.2.13.pre

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: d6babe3e613333fe10a6f30e6142e8b25d56d55b
4
- data.tar.gz: 164e58fc4dd9b1792d950a353b1970b0366a32cc
3
+ metadata.gz: 9d5606ecbd787ce825c5a101a8a1af65630d5971
4
+ data.tar.gz: bdce6f0f5b49ce18d81c01195308c5bd2254f24b
5
5
  SHA512:
6
- metadata.gz: 9abf11d0481be02b73636ba741b0c308a2ef5a384f5b5417e45016f73f19526ec9ccef0ed0ff56b8c135e83af528b78a880905a1d4e7f623f78c45431b6a5662
7
- data.tar.gz: 30ef47bbba88e9fc746ffad714ca06e12682c0dc751247d0ee9e2935e2dcdcfd8f6e175214664163986ca5b15eea9bdec5434594e96e386a302823b4960c3ac3
6
+ metadata.gz: 3b88a1d62f215d5220ac594afdd6b4b9f7f8976304079eff7b65bf6d9da89541b8fdb24fc0bddc3e4aaae78e711eb801bb0ceacc0aa886955aa8037469adc923
7
+ data.tar.gz: 6d2057b17f94ef51b22895eecb2e9db5f531ca83592eb572f335e9971675887ac9a91bc520cc0cc108bf125464483d96bcceb0c1b7c6dd6cf80e6d2b4a587ab0
@@ -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-tmpfix"
7
- spec.version = "0.2.12"
7
+ spec.version = "0.2.13.pre"
8
8
  spec.authors = ["bigwheel"]
9
9
  spec.email = ["example@example.com"]
10
10
  spec.summary = "Logentries output plugin for Fluent event collector"
@@ -20,6 +20,7 @@ class Fluent::LogentriesOutput < Fluent::BufferedOutput
20
20
 
21
21
  SSL_HOST = "api.logentries.com"
22
22
  NO_SSL_HOST = "data.logentries.com"
23
+ HOSTNAME = `hostname`.strip
23
24
 
24
25
  def configure(conf)
25
26
  super
@@ -127,8 +128,14 @@ class Fluent::LogentriesOutput < Fluent::BufferedOutput
127
128
  def send_logentries(token, data)
128
129
  retries = 0
129
130
  begin
130
- client.write("#{token} #{data} \n")
131
- rescue Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::ETIMEDOUT, Errno::EPIPE => e
131
+ client.write("#{token} #{HOSTNAME} #{data} \n")
132
+ rescue Errno::EMSGSIZE
133
+ str_length = data.length
134
+ send_logentries(token, data[0..str_length/2])
135
+ send_logentries(token, data[(str_length/2)+1..str_length])
136
+
137
+ log.warn "Message Too Long, re-sending it in two part..."
138
+ rescue => e
132
139
  if retries < @max_retries
133
140
  retries += 1
134
141
  @_socket = nil
@@ -137,12 +144,6 @@ class Fluent::LogentriesOutput < Fluent::BufferedOutput
137
144
  retry
138
145
  end
139
146
  raise ConnectionFailure, "Could not push logs to Logentries after #{retries} retries. #{e.message}"
140
- rescue Errno::EMSGSIZE
141
- str_length = data.length
142
- send_logentries(token, data[0..str_length/2])
143
- send_logentries(token, data[(str_length/2)+1..str_length])
144
-
145
- log.warn "Message Too Long, re-sending it in two part..."
146
147
  end
147
148
  end
148
149
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-logentries-tmpfix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - bigwheel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-31 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,9 +67,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ">="
70
+ - - ">"
71
71
  - !ruby/object:Gem::Version
72
- version: '0'
72
+ version: 1.3.1
73
73
  requirements: []
74
74
  rubyforge_project:
75
75
  rubygems_version: 2.5.1