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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2acb5fc295e6c870d34f4d47b131cc98eb27c94209c0e4e3ca5df486329fb890
4
- data.tar.gz: ca1f82b3de31a71d5d5dcd6c06278377dd75853ee762a2db569ac3dea2f8a4b7
3
+ metadata.gz: f16bc904625cfbec36eaf3ad28e21d8665c8ae3c4557d2674b66a77d5631a50c
4
+ data.tar.gz: eb1be89818e5867111a6a16513c2f9e6d2f60b13a9ad3f04d0383fa85dfe9cac
5
5
  SHA512:
6
- metadata.gz: 4f0e6582740d869c1be94de59cdddb1b4f78f7b7e1562d5ac071415f009f2233adc0b452d81adc5fccf8a53b7e030cabaa8e0dee1723c7ed8754296eb24e3615
7
- data.tar.gz: 6f8bbc3a4092a21054d3c4a62ae57ea7554db0f62c6933e0bff79e18d31720428f8f285d00cfaf32c447f07a5996a9b124db89859eef81b20f578fcea0d57252
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
 
@@ -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.2'
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.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-29 00:00:00.000000000 Z
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.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