uc3-dmp-cloudwatch 0.1.0 → 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: 5e70f9410b18afceae006186c8b9fa672563078b678eed1478508510e0c10c4f
4
- data.tar.gz: d99d0f4c64c863cffc986906256fa98dce43a9fd9121954ce67ff0d2b6e04309
3
+ metadata.gz: f16bc904625cfbec36eaf3ad28e21d8665c8ae3c4557d2674b66a77d5631a50c
4
+ data.tar.gz: eb1be89818e5867111a6a16513c2f9e6d2f60b13a9ad3f04d0383fa85dfe9cac
5
5
  SHA512:
6
- metadata.gz: 74846d9af82cc3927636c9999d3d8a292951cd3449da63c88acfbb441e6ce751164ef68301e300f225f84d628d91825013e8aaa6825db26b3cf00d7480fd4172
7
- data.tar.gz: 43b20e1e0dfc6cb32e3ce3d843e0e005ee0d25bba234beb2bf16e1960d79942fc11f99d65e41dffe19099a6f86ae3e5f9488210f1c2441f7b38ffca859bb53f6
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.0'
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.0
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: 2023-10-26 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.10
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