fluent-plugin-elasticsearch 3.4.3 → 3.5.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: 599f144cfd094f25416002686c3f4c11b693c3f5a28c33d18ddd670639d95b6f
4
- data.tar.gz: fcfcfaf1c73a5338740934d887273399a7b4396a2246f392ceb779281a7da9d7
3
+ metadata.gz: e569ad392bb2cd8d948582b76aaae250d4acb47d48ffe1f533a113062b75e100
4
+ data.tar.gz: a44cc9cdacc8f742c19ee81a3a7792ce7444a7170d6c4f3c71dbd631b5679f37
5
5
  SHA512:
6
- metadata.gz: 0c7a7176b04bbb770ad1ad9fd7f67a1f4ff8cdc7b4206fca5e1e677518c00ffa2329a1ae5ebeb1dd25e2d5324edd8df5e4c92a90c59a337b7ed2e68827aef4b6
7
- data.tar.gz: 69f91ef1ecbd148da6feac924f1d8c86668aa50191a76eccd53d9968e5ae47f6b33039ea1c693784fe89c688f0e4ee772077e9085ac511032b1490bdf3565706
6
+ metadata.gz: 2d3b8ba9dde0905e89c0f51170eedd84d7d6ff687a26341b2361a8982c7a47517ba01f86a217bc041cb8ba59340281928b8c56a834f8ff3cd4a5069ace176dae
7
+ data.tar.gz: 85be138322cf8db2843d16cf550490c0a275c37534d93a98e2c8b15016e10bcd5ba823b60f2918fe3116d5980c074b1bfdc8be76d26cb0b78eaa8dc6b4a97ca6
data/History.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### 3.5.0
6
+ - Adopt Elasticsearch ruby client v7 loggable class (#583)
7
+
5
8
  ### 3.4.3
6
9
  - Add fail_on_putting_template_retry_exceed config (#579)
7
10
 
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'fluent-plugin-elasticsearch'
6
- s.version = '3.4.3'
6
+ s.version = '3.5.0'
7
7
  s.authors = ['diogo', 'pitr']
8
8
  s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com']
9
9
  s.description = %q{Elasticsearch output plugin for Fluent event collector}
@@ -0,0 +1,38 @@
1
+ require 'fluent/log'
2
+ # For elasticsearch-ruby v7.0.0 or later
3
+ # logger for Elasticsearch::Loggable required the following methods:
4
+ #
5
+ # * debug?
6
+ # * info?
7
+ # * warn?
8
+ # * error?
9
+ # * fatal?
10
+
11
+ module Fluent
12
+ class Log
13
+ # Elasticsearch::Loggable does not request trace? method.
14
+ # def trace?
15
+ # @level <= LEVEL_TRACE
16
+ # end
17
+
18
+ def debug?
19
+ @level <= LEVEL_DEBUG
20
+ end
21
+
22
+ def info?
23
+ @level <= LEVEL_INFO
24
+ end
25
+
26
+ def warn?
27
+ @level <= LEVEL_WARN
28
+ end
29
+
30
+ def error?
31
+ @level <= LEVEL_ERROR
32
+ end
33
+
34
+ def fatal?
35
+ @level <= LEVEL_FATAL
36
+ end
37
+ end
38
+ end
@@ -13,6 +13,7 @@ require 'fluent/plugin/output'
13
13
  require 'fluent/event'
14
14
  require 'fluent/error'
15
15
  require 'fluent/time'
16
+ require 'fluent/log-ext'
16
17
  require_relative 'elasticsearch_constants'
17
18
  require_relative 'elasticsearch_error'
18
19
  require_relative 'elasticsearch_error_handler'
@@ -0,0 +1,35 @@
1
+ require 'helper'
2
+ require 'fluent/log-ext'
3
+
4
+ class TestFluentLogExtHandler < Test::Unit::TestCase
5
+ def setup
6
+ @log_device = Fluent::Test::DummyLogDevice.new
7
+ dl_opts = {:log_level => ServerEngine::DaemonLogger::INFO}
8
+ logger = ServerEngine::DaemonLogger.new(@log_device, dl_opts)
9
+ @log = Fluent::Log.new(logger)
10
+ end
11
+
12
+ def test_trace?
13
+ assert_false @log.respond_to?(:trace?)
14
+ end
15
+
16
+ def test_debug?
17
+ assert_true @log.respond_to?(:debug?)
18
+ end
19
+
20
+ def test_info?
21
+ assert_true @log.respond_to?(:info?)
22
+ end
23
+
24
+ def test_warn?
25
+ assert_true @log.respond_to?(:warn?)
26
+ end
27
+
28
+ def test_error?
29
+ assert_true @log.respond_to?(:error?)
30
+ end
31
+
32
+ def test_fatal?
33
+ assert_true @log.respond_to?(:fatal?)
34
+ end
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.3
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - diogo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-20 00:00:00.000000000 Z
12
+ date: 2019-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -144,6 +144,7 @@ files:
144
144
  - Rakefile
145
145
  - appveyor.yml
146
146
  - fluent-plugin-elasticsearch.gemspec
147
+ - lib/fluent/log-ext.rb
147
148
  - lib/fluent/plugin/elasticsearch_constants.rb
148
149
  - lib/fluent/plugin/elasticsearch_error.rb
149
150
  - lib/fluent/plugin/elasticsearch_error_handler.rb
@@ -160,6 +161,7 @@ files:
160
161
  - test/plugin/test_out_elasticsearch.rb
161
162
  - test/plugin/test_out_elasticsearch_dynamic.rb
162
163
  - test/plugin/test_template.json
164
+ - test/test_log-ext.rb
163
165
  homepage: https://github.com/uken/fluent-plugin-elasticsearch
164
166
  licenses:
165
167
  - Apache-2.0
@@ -191,3 +193,4 @@ test_files:
191
193
  - test/plugin/test_out_elasticsearch.rb
192
194
  - test/plugin/test_out_elasticsearch_dynamic.rb
193
195
  - test/plugin/test_template.json
196
+ - test/test_log-ext.rb