logglier 0.2.9 → 0.2.10
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 +8 -8
- data/lib/logglier/client/http/sync.rb +9 -5
- data/lib/logglier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWRiZTU4NmIzNWVmZDVkZmUyMzFkODY1ZmZmOTMxMDAwNzY5YjdiZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjY4MGFjYjk2MmVlMzJjNmJlZmFjYTlkZmQ3ZDNjZmJhNjY3YTczYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjM2ZWIzNzFlZWJiNDY3MmFiYThiY2VmZWZjNWVjNGM2ODkyODM5OGViYzhh
|
10
|
+
YWE3OGVhMGVlNGUxZTIxYTM3NzhhMTY4YWQzYmIyYmYxNTk5YWZhNmI0Y2M2
|
11
|
+
ZWI0NDNmMTE5NzJmMTgyNmQwY2RjNjYzNGJmZGFjMzUwNWU2MjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDdiODNmMjJiNTQ3YTQ4YzY3NGJlODFmMzNhY2JhZWFjNGNiYzE0NTkyYzU4
|
14
|
+
OTBkYzQ1MDJhMjFjOGZjMGZmNDE0ZjEyNzFmZmRkNTkzZDY3MGQ4ZGNiNTYw
|
15
|
+
ZjI2MDEwMmQ3ZGNmZDFiYjY4N2E2NjAwOWY5YmQ5YjgxODA2YjE=
|
@@ -42,8 +42,7 @@ module Logglier
|
|
42
42
|
else
|
43
43
|
@headers['Content-Type'] = 'text/plain'
|
44
44
|
end
|
45
|
-
|
46
|
-
connect!
|
45
|
+
@http = nil
|
47
46
|
end
|
48
47
|
|
49
48
|
# Delivers the message via HTTP, handling errors
|
@@ -53,18 +52,23 @@ module Logglier
|
|
53
52
|
retries = 0
|
54
53
|
|
55
54
|
begin
|
55
|
+
if @http.nil?
|
56
|
+
connect!
|
57
|
+
end
|
58
|
+
|
56
59
|
@http.request_post(@input_uri.path, message, @headers)
|
57
60
|
rescue *RETRY_EXCEPTIONS => e
|
61
|
+
@http = nil
|
58
62
|
if retries < RETRIES
|
59
63
|
retries += 1
|
60
64
|
failsafe_retrying(e, message, retries)
|
61
|
-
sleep
|
62
|
-
connect!
|
65
|
+
sleep(retries)
|
63
66
|
retry
|
64
67
|
else
|
65
68
|
failsafe_errored(e, message)
|
66
69
|
end
|
67
70
|
rescue Exception => e
|
71
|
+
@http = nil
|
68
72
|
failsafe_errored(e, message)
|
69
73
|
end
|
70
74
|
end
|
@@ -72,7 +76,7 @@ module Logglier
|
|
72
76
|
private
|
73
77
|
|
74
78
|
def connect!
|
75
|
-
@http_class = Net::HTTP::Proxy(@proxy_addr, @proxy_port, @proxy_user, @
|
79
|
+
@http_class = Net::HTTP::Proxy(@proxy_addr, @proxy_port, @proxy_user, @proxy_password)
|
76
80
|
@http = @http_class.new(@input_uri.host, @input_uri.port)
|
77
81
|
|
78
82
|
if @input_uri.scheme == 'https'
|
data/lib/logglier/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logglier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edward Muller (aka freeformz)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|