centralized_ruby_logger 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/centralized_ruby_logger.rb +2 -2
- data/lib/httpsender.rb +13 -2
- data/lib/manager.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 736938172b64af455525ee085d0d9074ab4c8d3ac6650a96366389ed45af3931
|
4
|
+
data.tar.gz: 7c65b71f1cdca2326cf8cd24a80d8a68e1f7d3e4d75583b9e7503a9d6827049d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43923897aade7111db8a567f406dce3d86168842d83d53718cc4982d79a811bace89fe2ec31d04749f66e662bd1a556e88db474f9ac2abde05ee0ce354feb8e5
|
7
|
+
data.tar.gz: 58ce3122d7c482c39ba7b039d26780ca8595d59abfbf5dd7fd7efbf58195da2f7877e2215c52c105090c37214a6828dd66978bac1a1243f4053471de22ae357e
|
@@ -8,10 +8,10 @@ module Coralogix
|
|
8
8
|
# Constructor.
|
9
9
|
#
|
10
10
|
# @param name - logger name.
|
11
|
-
def initialize private_key, app_name, sub_system_name, debug=false, type_name="Centralized Ruby", force_compression =
|
11
|
+
def initialize private_key, app_name, sub_system_name, debug=false, type_name="Centralized Ruby", force_compression=false, proxy={}
|
12
12
|
self.debug_mode=debug
|
13
13
|
@category = CORALOGIX_CATEGORY
|
14
|
-
@manager = LoggerManager.new
|
14
|
+
@manager = LoggerManager.new proxy
|
15
15
|
configure(private_key, app_name, sub_system_name, type_name, force_compression)
|
16
16
|
end
|
17
17
|
|
data/lib/httpsender.rb
CHANGED
@@ -25,7 +25,7 @@ module Coralogix
|
|
25
25
|
@force_compression = value
|
26
26
|
end
|
27
27
|
|
28
|
-
def initialize
|
28
|
+
def initialize proxy={}
|
29
29
|
begin
|
30
30
|
@initialized = false
|
31
31
|
@mutex = Mutex.new
|
@@ -33,7 +33,18 @@ module Coralogix
|
|
33
33
|
if(@disable_proxy)
|
34
34
|
@http = Net::HTTP.new(@uri.host, @uri.port, p_addr=nil, p_port=nil)
|
35
35
|
else
|
36
|
-
|
36
|
+
if proxy.empty? or proxy.fetch("host", nil).nil? or proxy.fetch("port", nil).nil?
|
37
|
+
@http = Net::HTTP.new(@uri.host, @uri.port)
|
38
|
+
else
|
39
|
+
@http = Net::HTTP.new(
|
40
|
+
@uri.host,
|
41
|
+
@uri.port,
|
42
|
+
p_addr=proxy["host"],
|
43
|
+
p_port=proxy["port"],
|
44
|
+
p_user=proxy.fetch("user", nil),
|
45
|
+
p_pass=proxy.fetch("password", nil)
|
46
|
+
)
|
47
|
+
end
|
37
48
|
end
|
38
49
|
@http.use_ssl = true
|
39
50
|
#@http.keep_alive_timeout = 10
|
data/lib/manager.rb
CHANGED
@@ -10,12 +10,12 @@ module Coralogix
|
|
10
10
|
|
11
11
|
attr_accessor :configured
|
12
12
|
|
13
|
-
def initialize
|
13
|
+
def initialize proxy={}
|
14
14
|
@logger_type = "Centralized Ruby"
|
15
15
|
@bulk_template = {:privateKey => FAILED_PRIVATE_KEY, :applicationName => NO_APP_NAME, :subsystemName => NO_SUB_SYSTEM}
|
16
16
|
@time_delta_last_update = 0
|
17
17
|
@time_delta = 0
|
18
|
-
@http_sender = CoralogixHTTPSender.new
|
18
|
+
@http_sender = CoralogixHTTPSender.new proxy
|
19
19
|
@buffer = []
|
20
20
|
@buffer_size = 0
|
21
21
|
@mutex = Mutex.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: centralized_ruby_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Royee Goldberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Coralogix Centralized Ruby Logger to send logs to Coralogix server.
|
14
14
|
email: royee@coralogix.com
|
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|
45
45
|
rubyforge_project:
|
46
|
-
rubygems_version: 2.7.
|
46
|
+
rubygems_version: 2.7.3
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: Coralogix Centralized Ruby Logger SDK
|