logstash-output-awslogs 0.1.16 → 0.1.17

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
  SHA1:
3
- metadata.gz: c577058c259721be2a675d37b9eb6e037a36dae7
4
- data.tar.gz: f62c2a74881102405d25040918d01e39c070afa4
3
+ metadata.gz: d401b9bf9bdc4cfbfcbfc67d15149c7808436cd7
4
+ data.tar.gz: 13457ea56d4948e7ba7e3dbffe01cc16054bf538
5
5
  SHA512:
6
- metadata.gz: ec0c812db998e77cf5b3a10c4e7f3fb8bd25b2e164b31cab55c2deaca192056c9649ff6ce506f26a776b8654d8a2f13caf628743fe00d5efa2f639fb13eda0bb
7
- data.tar.gz: 202ef2989f32eb07307c15403e191ce4c922a16f4b0e51190f80677a708763e6a04f4658c7669afa987262b758d5abcac9a5e97a1ec0a244d8e0649116f18ebc
6
+ metadata.gz: 2c592f05a971d09885c57092d163a0e05385c933cf74cd9db938f0b5c9a213dce542ed3636e73cd0afdcb4c56c9aa55f5af9415a59f08d075afb202c686f1604
7
+ data.tar.gz: 20736d09febf105024425cf86621948dd9a9d98b97901151f5fa2717e168d9b703a4569deb82d820fc3ef5074ae8b584c4d3e04dec0820d89cdd0eca9ce754a5
@@ -50,7 +50,7 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
50
50
 
51
51
  sequence_tokens.store(event_log_group_name, {})
52
52
  begin
53
- @client.describe_log_streams(log_group_name: event_log_group_name).each do |response|
53
+ @client.describe_log_streams({log_group_name: event_log_group_name}).each do |response|
54
54
  response.log_streams.each do |log_stream_data|
55
55
  sequence_tokens[event_log_group_name][log_stream_data.log_stream_name.to_s] = log_stream_data.upload_sequence_token.to_s
56
56
  end
@@ -58,15 +58,13 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
58
58
  rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
59
59
  @logger.info('Will create log group/stream and retry')
60
60
  begin
61
- @client.create_log_group(log_group_name: event_log_group_name)
61
+ @client.create_log_group({log_group_name: event_log_group_name})
62
62
  rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
63
63
  @logger.info("Log group #{event_log_group_name} already exists")
64
- rescue Exception => e
65
- @logger.error(e)
66
64
  end
67
65
  retry
68
66
  rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
69
- @logger.info('Logs throttling, retry')
67
+ @logger.info('Describe streams throttling, retry')
70
68
  retry
71
69
  end
72
70
  end
@@ -94,22 +92,18 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
94
92
  rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
95
93
  @logger.info('Will create log group/stream and retry')
96
94
  begin
97
- @client.create_log_group(log_group_name: send_opts[:log_group_name])
95
+ @client.create_log_group({log_group_name: send_opts[:log_group_name]})
98
96
  rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
99
97
  @logger.info("Log group #{send_opts[:log_group_name]} already exists")
100
- rescue Exception => e
101
- @logger.error(e)
102
98
  end
103
99
  begin
104
- @client.create_log_stream(log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name])
100
+ @client.create_log_stream({log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name]})
105
101
  rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
106
102
  @logger.info("Log stream #{send_opts[:log_stream_name]} already exists")
107
- rescue Exception => e
108
- @logger.error(e)
109
103
  end
110
104
  retry
111
105
  rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
112
- @logger.info('Logs throttling, retry')
106
+ @logger.info('Creating log streams throttling, retry')
113
107
  retry
114
108
  end
115
109
  end
@@ -119,26 +113,20 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
119
113
  rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
120
114
  @logger.info('Will create log group/stream and retry')
121
115
  begin
122
- @client.create_log_group(log_group_name: send_opts[:log_group_name])
116
+ @client.create_log_group({log_group_name: send_opts[:log_group_name]})
123
117
  rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
124
118
  @logger.info("Log group #{send_opts[:log_group_name]} already exists")
125
- rescue Exception => e
126
- @logger.error(e)
127
119
  end
128
120
  begin
129
- @client.create_log_stream(log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name])
121
+ @client.create_log_stream({log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name]})
130
122
  rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
131
123
  @logger.info("Log stream #{send_opts[:log_stream_name]} already exists")
132
- rescue Exception => e
133
- @logger.error(e)
134
124
  end
135
125
  retry
136
126
  # TODO: handle rejected events with debug message
137
127
  rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
138
128
  @logger.info('Logs throttling, retry')
139
129
  retry
140
- rescue Exception => e
141
- @logger.error(e)
142
130
  end
143
131
  end
144
132
  end # def multi_receive_encoded
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-awslogs'
3
- s.version = '0.1.16'
3
+ s.version = '0.1.17'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Writes events to AWS CloudWatch logs.'
6
6
  s.homepage = 'https://github.com/rickycook/logstash-output-awslogs'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-awslogs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Klyba