ruby_aem_aws 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conf/gem.yaml +1 -1
- data/lib/ruby_aem_aws/client/cloudwatch.rb +15 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 889a43cb7a66988ec2ff320e7d3aee6bf253543a
|
4
|
+
data.tar.gz: c07c8773e792398b5f83d5dd33fc9e8d777b2650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b9dc41c34f82148160b47d8b1c064d8a519c0d9aa5955006d620ac67b8b490fe29580efc8491a8d55da43f37d395439d07148aca83bc36d33a4628f8e1b399
|
7
|
+
data.tar.gz: fcccded1753d2f957c8605b2a5811f24bbce6187140607761022bc6fb69e035ae1ebd9a8678e1f57a583030ec266d7a0c194ba81a9bf817ed1929594ba0b5ab2
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version: 2.2.
|
1
|
+
version: 2.2.1
|
@@ -36,13 +36,24 @@ module RubyAemAws
|
|
36
36
|
# @param log_message Log message to filter for
|
37
37
|
# @return Cloudwatch log client filter_log_events response
|
38
38
|
def get_log_event(loggroup_name, log_stream_name, log_message)
|
39
|
+
# Initialise response as an empty response having no events and no next token
|
40
|
+
# This is needed to handle the scenario when initial filter log events returns
|
41
|
+
# a response with nil next token, ensuring the clients of this method to
|
42
|
+
# be able to identify any empty response events.
|
43
|
+
response = { events: [], next_token: nil }
|
44
|
+
|
39
45
|
filter = filter_for_cloudwatch_log_event(loggroup_name, log_stream_name, log_message)
|
40
|
-
|
46
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
41
47
|
|
42
|
-
|
43
|
-
|
48
|
+
# Since late 2021 (circa aws-sdk-cloudwatchlog 1.45.0), the last response
|
49
|
+
# is always empty (empty response events and nil next token).
|
50
|
+
# Previous to late 2021, the last response used to contain the filtered events
|
51
|
+
# with nil next token.
|
52
|
+
until curr_response.next_token.nil?
|
53
|
+
next_token = { next_token: curr_response.next_token }
|
44
54
|
filter.update(next_token)
|
45
|
-
response =
|
55
|
+
response = curr_response
|
56
|
+
curr_response = cloud_watch_log_client.filter_log_events(filter)
|
46
57
|
end
|
47
58
|
|
48
59
|
response
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|