uc3-dmp-cloudwatch 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-cloudwatch/logger.rb +8 -1
- data/lib/uc3-dmp-cloudwatch/version.rb +1 -1
- 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: f16bc904625cfbec36eaf3ad28e21d8665c8ae3c4557d2674b66a77d5631a50c
|
4
|
+
data.tar.gz: eb1be89818e5867111a6a16513c2f9e6d2f60b13a9ad3f04d0383fa85dfe9cac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4376529caf0bdf572f571323047e614db7c96a52e1454cef42e982e8402a6137e1a913c04c723d8789ed2ca4b7e4c42caf60c29bb39ac031257af799bacd98ea
|
7
|
+
data.tar.gz: cdf0727d1a4b1506959aaa1b6db18807b47e31c3ec8ed3d7cd8d6d0190fe79e2faeceea931568e95ebd5beaf7cc3866eea6d857831d5a7305ab487598aa48ed9
|
@@ -7,7 +7,7 @@ module Uc3DmpCloudwatch
|
|
7
7
|
class Logger
|
8
8
|
attr_accessor :source, :event, :request_id, :level
|
9
9
|
|
10
|
-
LOG_LEVELS = %w[none error info debug].freeze
|
10
|
+
LOG_LEVELS = %w[none error warn info debug].freeze
|
11
11
|
|
12
12
|
def initialize(**args)
|
13
13
|
@level = args.fetch(:level, 'info')&.to_s&.downcase
|
@@ -26,6 +26,13 @@ module Uc3DmpCloudwatch
|
|
26
26
|
_log_event(mode: 'error')
|
27
27
|
end
|
28
28
|
|
29
|
+
def warn(message:, details: {})
|
30
|
+
return false if %w[none error].include?(@level) || message.nil?
|
31
|
+
|
32
|
+
_format_msg(mode: 'warn', msg: message)
|
33
|
+
_format_msg(mode: 'warn', msg: details) if _valid_details(details:)
|
34
|
+
end
|
35
|
+
|
29
36
|
def info(message:, details: {})
|
30
37
|
return false if %w[none error].include?(@level) || message.nil?
|
31
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-cloudwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05
|
11
|
+
date: 2024-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
100
|
+
rubygems_version: 3.5.13
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: DMPTool gem that provides support for writing standardized logs to CloudWatch
|