simple_cloud_logging 1.1.16 → 1.1.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56d398200fdaf080fb7174b5dcb73f044ca7d441
4
- data.tar.gz: 53c7f8eaec31d8b2d4cbd926a36caa414e8e6c9e
3
+ metadata.gz: 90eefdd462aa32f103b9c5f97b2115aacab6b2d0
4
+ data.tar.gz: 3f85adb497cba39604c9f3d688705b996cdc6fb1
5
5
  SHA512:
6
- metadata.gz: ac0ffc673c4713ee3d857d7d8d3875c80a07c7237906d0287f2fa56d5ebd0a7ce6897f5024a74cc934d59e84f1e9db1a518416f29bdc69513ce6c5737a91ed1e
7
- data.tar.gz: 4442f26f6b9fc7be11ccfa62b8989cbf3aaca81caa9fb7ea86ad2c237417a585c5ebba53d00154500af8c7c20228701f27cce4ea02a978742a1d1d547341c229
6
+ metadata.gz: 5498baa0bc6ff96e92950cf6abf65bf1f751e7c0935cb13e37a14040f6f09c764d6220cf155e262e429749592b4cebea7d1cb95464153654b8c95285cdbf4355
7
+ data.tar.gz: a89475f633eb04781e327132bb71a68727694be1b6c709bafe95cf35d031afb7845745203395a30d757f3324bff91e75c2dc884dbe0d012d41e65457c1640f10
data/lib/baselogger.rb CHANGED
@@ -42,13 +42,15 @@ module BlackStack
42
42
  ltext += "\n"
43
43
  end
44
44
 
45
+ ltext += ltime + ": "
46
+
45
47
  i=1
46
48
  while (i<self.nest_level)
47
49
  ltext += " > "
48
50
  i+=1
49
51
  end
50
52
 
51
- ltext += ltime + ": " + s
53
+ ltext += s
52
54
 
53
55
  #File.open(self.filename, 'a') { |file| file.write(ltext) }
54
56
  print ltext
@@ -64,14 +66,16 @@ module BlackStack
64
66
  t = !datetime.nil? ? datetime : Time.now
65
67
  ltime = t.strftime("%Y-%m-%d %H:%M:%S").to_s
66
68
 
67
- ltext = ""
69
+ ltext = ''
70
+
68
71
  if self.number_of_lines_in_current_level > 0
72
+ ltext = ltime + ": "
73
+
69
74
  i=1
70
75
  while (i<self.nest_level)
71
76
  ltext += " > "
72
77
  i+=1
73
78
  end
74
- ltext += ltime + ": "
75
79
  end # if self.number_of_lines_in_current_level == 0
76
80
 
77
81
  self.nest_level -= 1
@@ -94,7 +98,7 @@ module BlackStack
94
98
 
95
99
  def error(e=nil)
96
100
  self.logf("error") if e.nil?
97
- self.logf("error:#{e.to_s}.") if !e.nil?
101
+ self.logf("error: #{e.to_console}.") if !e.nil?
98
102
  end
99
103
 
100
104
  def yes()
data/lib/remotelogger.rb CHANGED
@@ -1,14 +1,15 @@
1
1
  module BlackStack
2
2
  require_relative './baselogger'
3
3
  class RemoteLogger < BlackStack::BaseLogger
4
- attr_accessor :api_protocol, :api_domain, :api_port, :api_key
4
+ attr_accessor :api_protocol, :api_domain, :api_port, :api_key, :id_client
5
5
 
6
- def initialize(the_filename, the_api_protocol, the_api_domain, the_api_port, the_api_key)
6
+ def initialize(the_filename, the_api_protocol, the_api_domain, the_api_port, the_api_key, the_id_client=nil)
7
7
  super(the_filename)
8
8
  self.api_protocol = the_api_protocol
9
9
  self.api_domain = the_api_domain
10
10
  self.api_port = the_api_port
11
11
  self.api_key = the_api_key
12
+ self.id_client = the_id_client
12
13
  end
13
14
 
14
15
  # call the parent class to set the attributes
@@ -19,6 +20,7 @@ module BlackStack
19
20
  res = BlackStack::Netting::api_call(url, {
20
21
  'api_key' => self.api_key,
21
22
  'filename' => self.filename,
23
+ 'id_client' => self.id_client,
22
24
  })
23
25
  end
24
26
 
@@ -30,6 +32,7 @@ module BlackStack
30
32
  'filename' => self.filename,
31
33
  'text' => s,
32
34
  'method' => BlackStack::BaseLogger::METHOD_LOG,
35
+ 'id_client' => self.id_client,
33
36
  })
34
37
  ltext
35
38
  end
@@ -42,6 +45,7 @@ module BlackStack
42
45
  'filename' => self.filename,
43
46
  'text' => s,
44
47
  'method' => BlackStack::BaseLogger::METHOD_LOGS,
48
+ 'id_client' => self.id_client,
45
49
  })
46
50
  ltext
47
51
  end
@@ -54,6 +58,7 @@ module BlackStack
54
58
  'filename' => self.filename,
55
59
  'text' => s,
56
60
  'method' => BlackStack::BaseLogger::METHOD_LOGF,
61
+ 'id_client' => self.id_client,
57
62
  })
58
63
  ltext
59
64
  end
@@ -63,6 +68,7 @@ module BlackStack
63
68
  res = BlackStack::Netting::api_call(url, {
64
69
  'api_key' => self.api_key,
65
70
  'filename' => self.filename,
71
+ 'id_client' => self.id_client,
66
72
  })
67
73
  end
68
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_cloud_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.16
4
+ version: 1.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blackstack_commons
@@ -16,21 +16,21 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.10
19
+ version: 1.1.40
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.0.10
22
+ version: 1.1.40
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.0.10
29
+ version: 1.1.40
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.0.10
33
- description: 'Find documentation here: https://github.com/leandrosardi/simple_cloud_logging.'
32
+ version: 1.1.40
33
+ description: 'THIS GEM IS STILL IN DEVELOPMENT STAGE. Find documentation here: https://github.com/leandrosardi/simple_cloud_logging.'
34
34
  email: leandro.sardi@expandedventure.com
35
35
  executables: []
36
36
  extensions: []
@@ -67,6 +67,7 @@ rubyforge_project:
67
67
  rubygems_version: 2.4.5.1
68
68
  signing_key:
69
69
  specification_version: 4
70
- summary: Easy library to write log files in the cloud, watch them anywhere, and enbed
71
- the log in any website. The remote-logging feature is still being written.
70
+ summary: THIS GEM IS STILL IN DEVELOPMENT STAGE. Easy library to write log files in
71
+ the cloud, watch them anywhere, and enbed the log in any website. The remote-logging
72
+ feature is still being written.
72
73
  test_files: []