lsslog 0.1.7.4 → 0.1.7.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of lsslog might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/lsslog/v2/log.rb +6 -2
- data/lib/lsslog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2901aaa24e2e5febc70327cda7c28a9f69d138ed480b516933574a367802d1d6
|
4
|
+
data.tar.gz: cd7ffabe342465071c43b9cfb3ff26181ee6e36f6bbe7dfc62fbf9feaf46a91f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f29202fb14d5c0c9e6b170d6b729522d73437758ac3253e028c6b8fcacbfd6fe61e90f95a402f8f05519ade3a020d8301b5de5ae68d9c6e1663c50ff88810ef
|
7
|
+
data.tar.gz: 903079823059e4cc52530c53d02287bb396f448a86a2bac233c31e72cb738da38f2e63d532d54a0ac075caadfb3bfc304c82f76b2ea9741c435536974c3a3dec
|
data/lib/lsslog/v2/log.rb
CHANGED
@@ -5,10 +5,12 @@ module Lsslog
|
|
5
5
|
module V2
|
6
6
|
class Service
|
7
7
|
def initialize
|
8
|
+
Rails.logger.info("Initialize")
|
8
9
|
@stub = Lsslog::V2::Stub.new(lss_host, :this_channel_is_insecure)
|
9
10
|
end
|
10
11
|
|
11
12
|
def log(message_h:, severity:, component: '', api: '')
|
13
|
+
Rails.logger.info("Begin log function")
|
12
14
|
message_struct = hash_to_struct(message_h)
|
13
15
|
|
14
16
|
log_ver2 = Lsslog::LogVer2.new(
|
@@ -26,10 +28,10 @@ module Lsslog
|
|
26
28
|
rescue GRPC::BadStatus => e
|
27
29
|
Rails.logger.error("Error sending LSS log: #{e.message}")
|
28
30
|
nil
|
31
|
+
rescue StandardError => e
|
32
|
+
Rails.logger.info("#{e.backtrace}, #{e.message}")
|
29
33
|
end
|
30
34
|
|
31
|
-
private
|
32
|
-
|
33
35
|
def lss_host
|
34
36
|
@lss_host ||= ::Lsslog.configuration.lss_host
|
35
37
|
raise 'Lsslog.configuration.lss_host is missing' unless @lss_host
|
@@ -37,6 +39,8 @@ module Lsslog
|
|
37
39
|
@lss_host
|
38
40
|
end
|
39
41
|
|
42
|
+
private
|
43
|
+
|
40
44
|
def hash_to_struct(hash)
|
41
45
|
Google::Protobuf::Struct.new(fields: hash.transform_values { |v| to_proto_value(v) })
|
42
46
|
end
|
data/lib/lsslog/version.rb
CHANGED