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 +4 -4
- data/fluent-plugin-logentries.gemspec +1 -1
- data/lib/fluent/plugin/out_logentries.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b022397d867cd4aebf962dbf96c046d24393ba3
|
4
|
+
data.tar.gz: 983c9ab26ce1b416aa3deadb4bce678f265c9118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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
|
-
|
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.
|
127
|
+
client.write data
|
126
128
|
rescue Errno::ECONNREFUSED, Errno::ETIMEDOUT => e
|
127
129
|
if retries < @max_retries
|
128
130
|
retries += 1
|