simple_cloud_logging 1.1.12 → 1.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/remotelogger.rb +8 -7
- 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: 085b61709dee222254d56b36ab1758a03fe28598
|
4
|
+
data.tar.gz: be3419091b1a7e658bbf4df854c0849a4bf12d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 210e11498d59d37d57429cae4627183cf6cdff7efc8d78c44ec0d01a16bfc351834de8cc13bf67fbe5b8cb7f4b56d62f59678459e313246b171f042a34e3c0a8
|
7
|
+
data.tar.gz: b4a1d74913f0d9bb02d58b241a985a7e990379bb83b98b5f2a78bdb817c5695f38785731f68983b04c708fe8d78d5974e7443c138ab7915dcbadbd96db71003d
|
data/lib/remotelogger.rb
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
module BlackStack
|
2
2
|
require_relative './baselogger'
|
3
3
|
class RemoteLogger < BlackStack::BaseLogger
|
4
|
-
attr_accessor :
|
4
|
+
attr_accessor :api_protocol, :api_domain, :api_port, :api_key
|
5
5
|
|
6
|
-
def initialize(the_filename,
|
6
|
+
def initialize(the_filename, the_api_protocol, the_api_domain, the_api_port, the_api_key)
|
7
7
|
super(the_filename)
|
8
|
-
self.
|
8
|
+
self.api_protocol = the_api_protocol
|
9
|
+
self.api_domain = the_api_domain
|
9
10
|
self.api_port = the_api_port
|
10
11
|
self.api_key = the_api_key
|
11
12
|
end
|
12
13
|
|
13
14
|
def log(s, datetime=nil)
|
14
15
|
ltext = super(s, datetime)
|
15
|
-
url = "#{self.
|
16
|
+
url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
|
16
17
|
res = BlackStack::Netting::api_call(url, {
|
17
18
|
'api_key' => self.api_key,
|
18
19
|
'filename' => self.filename,
|
@@ -24,7 +25,7 @@ module BlackStack
|
|
24
25
|
|
25
26
|
def logs(s, datetime=nil)
|
26
27
|
ltext = super(s, datetime)
|
27
|
-
url = "#{self.
|
28
|
+
url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
|
28
29
|
res = BlackStack::Netting::api_call(url, {
|
29
30
|
'api_key' => self.api_key,
|
30
31
|
'filename' => self.filename,
|
@@ -36,7 +37,7 @@ module BlackStack
|
|
36
37
|
|
37
38
|
def logf(s, datetime=nil)
|
38
39
|
ltext = super(s, datetime)
|
39
|
-
url = "#{self.
|
40
|
+
url = "#{self.api_protocol}://#{self.api_domain}:#{self.api_port.to_s}/api1.4/scl/log.json"
|
40
41
|
res = BlackStack::Netting::api_call(url, {
|
41
42
|
'api_key' => self.api_key,
|
42
43
|
'filename' => self.filename,
|
@@ -47,7 +48,7 @@ module BlackStack
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def release()
|
50
|
-
url = "#{self.api_url}:#{self.api_port}/api1.4/scl/release.json"
|
51
|
+
url = "#{self.api_url}:#{self.api_port.to_s}/api1.4/scl/release.json"
|
51
52
|
res = BlackStack::Netting::api_call(url, {
|
52
53
|
'api_key' => self.api_key,
|
53
54
|
'filename' => self.filename,
|