fluent-plugin-cloudwatch-logs 0.5.1 → 0.6.0

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: f405e2301a22e37b9768748f88df73b9ecba6e1b5311f78992c9117b45da95f8
4
- data.tar.gz: 51973be01ee296b0fcb5f7abb26605c0f67385fea4449b7bc301281667185406
3
+ metadata.gz: 4f4792d605b22ee6912e36c02a7e20037c91d9912bb68ae14dd3fbb49b7afa0b
4
+ data.tar.gz: 445aa7b5656044ae51b54dbc86d6a0a6509682ae9cb273b19a1f4742d123ecb4
5
5
  SHA512:
6
- metadata.gz: '0439979ebd2e1e4d5bc8876ad652a1c790ff311f6857bfcf7f9a9d1748d66bea5acb01944939947ac8d1171d76faaadd40b6bf7238c32eef61efb995aa067087'
7
- data.tar.gz: b6de5f1d520370a5a2fadba7da8960a11b3ded740155d7f6efa05db686a30bc3ed6e854274ed968ecd4a421dcbef6b01dccc259e5daa9dce3ca5570b4668163e
6
+ metadata.gz: 50726dbbe3b574499b65a54469afc04d13a2b82011253992bd662338bae1351106ab4a0e430f4f48537c8c7a8dc9866ec0fab264cba31373d1689dae5fc65082
7
+ data.tar.gz: 8911874548680ac11cbf36c148c1dbe0e60b869d617d34b99711dbcbeb09e93aefac66e9e8e4ba4d3427bb45f42ac0d1fad3b103d2b3f3523172d331a648f39a
@@ -2,7 +2,7 @@ module Fluent
2
2
  module Plugin
3
3
  module Cloudwatch
4
4
  module Logs
5
- VERSION = "0.5.1"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
8
8
  end
@@ -22,7 +22,7 @@ module Fluent::Plugin
22
22
  config_param :state_file, :string
23
23
  config_param :fetch_interval, :time, default: 60
24
24
  config_param :http_proxy, :string, default: nil
25
- config_param :json_handler, :enum, list: [:yajl, :json], :default => :json
25
+ config_param :json_handler, :enum, list: [:yajl, :json], :default => :yajl
26
26
 
27
27
  config_section :parse do
28
28
  config_set_default :@type, 'none'
@@ -42,7 +42,7 @@ module Fluent::Plugin
42
42
  config_param :retention_in_days, :integer, default: nil
43
43
  config_param :retention_in_days_key, :string, default: nil
44
44
  config_param :remove_retention_in_days, :bool, default: false
45
- config_param :json_handler, :enum, list: [:yajl, :json], :default => :json
45
+ config_param :json_handler, :enum, list: [:yajl, :json], :default => :yajl
46
46
 
47
47
  config_section :buffer do
48
48
  config_set_default :@type, DEFAULT_BUFFER_TYPE
@@ -37,7 +37,7 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
37
37
  assert_equal('stream', d.instance.log_stream_name)
38
38
  assert_equal(true, d.instance.use_log_stream_name_prefix)
39
39
  assert_equal('/tmp/state', d.instance.state_file)
40
- assert_equal(:json, d.instance.json_handler)
40
+ assert_equal(:yajl, d.instance.json_handler)
41
41
  end
42
42
 
43
43
  def test_emit
@@ -102,15 +102,15 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
102
102
 
103
103
  time_ms = (Time.now.to_f * 1000).floor
104
104
  put_log_events([
105
- {timestamp: time_ms + 10, message: '{"cloudwatch":"logs1"}'},
106
- {timestamp: time_ms + 20, message: '{"cloudwatch":"logs2"}'},
105
+ {timestamp: time_ms + 1000, message: '{"cloudwatch":"logs1"}'},
106
+ {timestamp: time_ms + 2000, message: '{"cloudwatch":"logs2"}'},
107
107
  ])
108
108
 
109
109
  new_log_stream("testprefix")
110
110
  create_log_stream
111
111
  put_log_events([
112
- {timestamp: time_ms + 30, message: '{"cloudwatch":"logs3"}'},
113
- {timestamp: time_ms + 40, message: '{"cloudwatch":"logs4"}'},
112
+ {timestamp: time_ms + 3000, message: '{"cloudwatch":"logs3"}'},
113
+ {timestamp: time_ms + 4000, message: '{"cloudwatch":"logs4"}'},
114
114
  ])
115
115
 
116
116
  sleep 5
@@ -131,10 +131,10 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
131
131
 
132
132
  emits = d.events
133
133
  assert_equal(4, emits.size)
134
- assert_equal(['test', ((time_ms + 10) / 1000).floor, {'cloudwatch' => 'logs1'}], emits[0])
135
- assert_equal(['test', ((time_ms + 20) / 1000).floor, {'cloudwatch' => 'logs2'}], emits[1])
136
- assert_equal(['test', ((time_ms + 30) / 1000).floor, {'cloudwatch' => 'logs3'}], emits[2])
137
- assert_equal(['test', ((time_ms + 40) / 1000).floor, {'cloudwatch' => 'logs4'}], emits[3])
134
+ assert_true(emits.include? ['test', ((time_ms + 1000) / 1000).floor, {'cloudwatch' => 'logs1'}])
135
+ assert_true(emits.include? ['test', ((time_ms + 2000) / 1000).floor, {'cloudwatch' => 'logs2'}])
136
+ assert_true(emits.include? ['test', ((time_ms + 3000) / 1000).floor, {'cloudwatch' => 'logs3'}])
137
+ assert_true(emits.include? ['test', ((time_ms + 4000) / 1000).floor, {'cloudwatch' => 'logs4'}])
138
138
  end
139
139
 
140
140
  private
@@ -40,7 +40,7 @@ class CloudwatchLogsOutputTest < Test::Unit::TestCase
40
40
  assert_equal("tagvalue", d.instance.log_group_aws_tags.fetch("tagkey"))
41
41
  assert_equal("tagvalue_2", d.instance.log_group_aws_tags.fetch("tagkey_2"))
42
42
  assert_equal(5, d.instance.retention_in_days)
43
- assert_equal(:json, d.instance.json_handler)
43
+ assert_equal(:yajl, d.instance.json_handler)
44
44
  end
45
45
 
46
46
  def test_write
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudwatch-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd