logstash-output-awslogs 0.1.22 → 0.1.23

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: 9584b5be53cc5cd5f7397547f5fa880085c55ab14a37cba3bb16684976ddeda3
4
- data.tar.gz: 88796ea88b9cd8d735cd5f185c0b9c98e4d14ffb3927f6eaf1a6db1d83a3228e
3
+ metadata.gz: 7b230422347a67d44cc5a3277e024f0935866278c754396142f3cb6b1c0d6a4d
4
+ data.tar.gz: fff343b28f5fcb63a47f1ceaa5da80014d2be023fd06addbe4b1cd9c797901d6
5
5
  SHA512:
6
- metadata.gz: 93c208b2978085d69009ed77471980b37488a51079c8013582e3a75f46820935965f009388eed5754c5bd496aacceda060c2e8b553f911b2848579c3323ce55c
7
- data.tar.gz: 6738e1b4ee6b31fbe90ede296da1ee55eb0dd1f2205163aed267d0e4ead370ad7e0bc54550bda8b978f4f7f1d3ba63768487c2039af04b059022cf9511679237
6
+ metadata.gz: 6b827cfe658efb98103088f829d7d5ae147171d0d1bd1656c50ab1364ffd708bd411fb372226d293653c59937729984676a57e6db16874afc4f7d12c59b0650e
7
+ data.tar.gz: 637271353ffdef124f9133cce332635225620b3d8a32aeae69cb5a32a6e723c8dcf0ac443f3560ad467e04df77e603610c41516ce5d55360cba3d63dca3e8703
@@ -30,7 +30,7 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
30
30
  to_send = {}
31
31
  sequence_tokens = {}
32
32
 
33
- events_and_encoded.each do |event, _encoded|
33
+ events_and_encoded.each do |event, encoded|
34
34
  event_log_stream_name = event.sprintf(log_stream_name)
35
35
  event_log_group_name = event.sprintf(log_group_name)
36
36
 
@@ -38,10 +38,17 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
38
38
  unless to_send.keys.include? next_sequence_token_key
39
39
  to_send.store(next_sequence_token_key, [])
40
40
  end
41
- to_send[next_sequence_token_key].push(
42
- timestamp: (event.timestamp.time.to_f * 1000).to_int,
43
- message: event.get('message')
44
- )
41
+ if event.get('message').empty?
42
+ to_send[next_sequence_token_key].push(
43
+ timestamp: (event.timestamp.time.to_f * 1000).to_int,
44
+ message: encoded
45
+ )
46
+ else
47
+ to_send[next_sequence_token_key].push(
48
+ timestamp: (event.timestamp.time.to_f * 1000).to_int,
49
+ message: event.get('message')
50
+ )
51
+ end
45
52
  end
46
53
 
47
54
  group_names = []
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-awslogs'
3
- s.version = '0.1.22'
3
+ s.version = '0.1.23'
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.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Klyba