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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45af497aead3a63d0421a1232f375324d58e76efce648b857682d1ae68e186bb
4
- data.tar.gz: cb82998326af48c6ce3169e4c82f1a77d760cf5455f9a5e0960c62fee00f3042
3
+ metadata.gz: 2901aaa24e2e5febc70327cda7c28a9f69d138ed480b516933574a367802d1d6
4
+ data.tar.gz: cd7ffabe342465071c43b9cfb3ff26181ee6e36f6bbe7dfc62fbf9feaf46a91f
5
5
  SHA512:
6
- metadata.gz: 2cf6cd3ace2d9f2c14a2b3c6ad6e35a3833d52320cc5447039a640f6b8ed838a72cb75b4eea214d19d1e41b5cb00baccff2d4be62554b90900b7dcf463b374e1
7
- data.tar.gz: 6653e1f22e72010afd43c82f931e586102c6b24c220fcdd85785d41bddff2d31425f8a99dfd501f3d2f183ce26a539b81ad76178ecdb45216ad71cb227868161
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
@@ -1,3 +1,3 @@
1
1
  module Lsslog
2
- VERSION = "0.1.7.4"
2
+ VERSION = "0.1.7.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lsslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7.4
4
+ version: 0.1.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thanh Ngo