fluent-plugin-logentries 0.2.3 → 0.2.4

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: c1fc17a79f9e065c5a8a9f6864b9297c1baf7765
4
- data.tar.gz: bef9079fbd310d72a44d277bfe0084c9021e0504
3
+ metadata.gz: 0b022397d867cd4aebf962dbf96c046d24393ba3
4
+ data.tar.gz: 983c9ab26ce1b416aa3deadb4bce678f265c9118
5
5
  SHA512:
6
- metadata.gz: b8c205c48bc660ed68551c2b93becea9ef3e3768b01d64aae23708ef5145970ae250e610c704e2a41e718399319c88afb105101518f411c5d981624e2ebf5b07
7
- data.tar.gz: f3039171065808e2d41bbcb2bc7c691161dc16bb1da32f6203e25eb9f6a6e13ba9ecac485a2671502a043db79e8677144430c50d926235f5c61252d38f839df0
6
+ metadata.gz: 5d08e28ca47cca2cd07775ea403ed560337b5d78b0c13a1c01178ca9214e0ee58903bff052442ebab56b1eccb32d849895c89a4719ebcf041fa8f3bb0fc3a969
7
+ data.tar.gz: ba55eb1e1633b8c597ab1a95e801a80eec317419fec67d1bf28d04c932b2999419217b9a72e03a472acc4924cc11f12845a8a495ecc3ebb8836bef3062ff8b5f
@@ -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.2.3"
7
+ spec.version = "0.2.4"
8
8
  spec.authors = ["Woorank"]
9
9
  spec.email = ["dev@woorank.com"]
10
10
  spec.summary = "Logentries output plugin for Fluent event collector"
@@ -21,6 +21,7 @@ class LogentriesOutput < Fluent::BufferedOutput
21
21
 
22
22
  def configure(conf)
23
23
  super
24
+
24
25
  @tokens = nil
25
26
  @last_edit = Time.at(0)
26
27
  end
@@ -33,7 +34,7 @@ class LogentriesOutput < Fluent::BufferedOutput
33
34
  super
34
35
  end
35
36
 
36
- def ssl_client
37
+ def client
37
38
  @_socket ||= if @use_ssl
38
39
  context = OpenSSL::SSL::SSLContext.new
39
40
  socket = TCPSocket.new SSL_HOST, @port
@@ -115,14 +116,15 @@ class LogentriesOutput < Fluent::BufferedOutput
115
116
  token = get_token(tag, record)
116
117
  next if token.nil?
117
118
 
118
- send_logentries(token + ' ' + record["message"])
119
+ message = record["message"];
120
+ send_logentries("#{token} #{message} \n")
119
121
  end
120
122
  end
121
123
 
122
124
  def send_logentries(data)
123
125
  retries = 0
124
126
  begin
125
- client.puts data
127
+ client.write data
126
128
  rescue Errno::ECONNREFUSED, Errno::ETIMEDOUT => e
127
129
  if retries < @max_retries
128
130
  retries += 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-logentries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Woorank