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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2acb5fc295e6c870d34f4d47b131cc98eb27c94209c0e4e3ca5df486329fb890
4
- data.tar.gz: ca1f82b3de31a71d5d5dcd6c06278377dd75853ee762a2db569ac3dea2f8a4b7
3
+ metadata.gz: 413f49276569ccb3c1b06989aeefe5e544480cc7014f47bfd68ce6e81ec2f61e
4
+ data.tar.gz: bf5afecf290dd2ef8ca084580bae8bb581999685d01f0e59eee65e5de893ba4d
5
5
  SHA512:
6
- metadata.gz: 4f0e6582740d869c1be94de59cdddb1b4f78f7b7e1562d5ac071415f009f2233adc0b452d81adc5fccf8a53b7e030cabaa8e0dee1723c7ed8754296eb24e3615
7
- data.tar.gz: 6f8bbc3a4092a21054d3c4a62ae57ea7554db0f62c6933e0bff79e18d31720428f8f285d00cfaf32c447f07a5996a9b124db89859eef81b20f578fcea0d57252
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpCloudwatch
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
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.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: 2024-05-29 00:00:00.000000000 Z
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.4.22
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