uc3-dmp-cloudwatch 0.1.1 → 0.1.3
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: 413f49276569ccb3c1b06989aeefe5e544480cc7014f47bfd68ce6e81ec2f61e
|
4
|
+
data.tar.gz: bf5afecf290dd2ef8ca084580bae8bb581999685d01f0e59eee65e5de893ba4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36f75834c3b674a85b23f84e3b4aeabfd6857a03b7aaec76b031e507c1852f484e18f7bdd4d3916347f6016a49c0aa92faf6bf8ef06517500fdd15cae8d21ecb
|
7
|
+
data.tar.gz: 357cc46bc31903fc5ac53ea8daf4e6d60cbbd3962c84c5f3fd957889f8f53768967270a0167492e75ea02e38277c963a2baa9262212a1658d1f0d8cb725d94a4
|
@@ -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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-30 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
|