semantic_logger 4.14.0 → 4.15.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: 966d1357f842de3f83f7b0c479152a401906da47588a8f64525ea0fee406a017
4
- data.tar.gz: 3528480641795abc6f38fe4617f4599be81b276ab4184c719b1f6ee7e555fb07
3
+ metadata.gz: fcbc97117f68557ed7ffb4a60ccc482f712462436e4c612041d3496458f67826
4
+ data.tar.gz: a847bf4a506663eb3e6c6f428fe53ae7a4f647589d10e129e9d64b0c40ef1ebe
5
5
  SHA512:
6
- metadata.gz: 6e75514558375d84db0943fbca39295c1011f9def7a86ddc2592c1de7cd0a460c61158ecbdfa35954ec768baa3bfc7b7b068ca802723b6daf64a050a31814c60
7
- data.tar.gz: 9c351b2d1eb79c5cfbde72304e6557e0d18526746be4ef3777bb1130a2a675a069321954e617d799c7d6dc2ddc60fd425cc33b9bd9ec148d04931336aa048286
6
+ metadata.gz: 4069c6fa8e26e84287ef4a521b83663d6bd8976e61d1793fd6c761c0c7714a1a8a3e5a34c29faf35b7f8e3e425404831c9e44d37d6fe3dca8a7271b791231332
7
+ data.tar.gz: 5deba5054ad0e7e4240d88e705ef0862af3e72afd4219d7ac9ff99cee892f45efbf1de432b1dbadc976270ef19db6958dd0a4d6c4f35bc1203dfc2a4a4f0a356
@@ -37,6 +37,7 @@ module SemanticLogger
37
37
  #
38
38
  # type: [String]
39
39
  # Document type to associate with logs when they are written.
40
+ # Deprecated in Elasticsearch 7.0.0.
40
41
  # Default: 'log'
41
42
  #
42
43
  # level: [:trace | :debug | :info | :warn | :error | :fatal]
@@ -193,7 +194,9 @@ module SemanticLogger
193
194
  if @data_stream
194
195
  {"create" => {}}
195
196
  else
196
- {"index" => {"_index" => expanded_index_name, "_type" => type}}
197
+ bulk_index = {"index" => {"_index" => expanded_index_name}}
198
+ bulk_index["index"].merge!({ "_type" => type }) if version_supports_type?
199
+ bulk_index
197
200
  end
198
201
  end
199
202
 
@@ -206,6 +209,12 @@ module SemanticLogger
206
209
 
207
210
  SemanticLogger::Formatters::Raw.new(time_format: :iso_8601, time_key: time_key)
208
211
  end
212
+
213
+ private
214
+
215
+ def version_supports_type?
216
+ Gem::Version.new(::Elasticsearch::VERSION) < Gem::Version.new(7)
217
+ end
209
218
  end
210
219
  end
211
220
  end
@@ -26,6 +26,7 @@ module SemanticLogger
26
26
  #
27
27
  # type: [String]
28
28
  # Document type to associate with logs when they are written.
29
+ # Deprecated in Elasticsearch 7.0.0
29
30
  # Default: 'log'
30
31
  #
31
32
  # level: [:trace | :debug | :info | :warn | :error | :fatal]
@@ -1,3 +1,3 @@
1
1
  module SemanticLogger
2
- VERSION = "4.14.0".freeze
2
+ VERSION = "4.15.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-31 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -101,7 +101,7 @@ licenses:
101
101
  metadata:
102
102
  bug_tracker_uri: https://github.com/reidmorrison/semantic_logger/issues
103
103
  documentation_uri: https://logger.rocketjob.io
104
- source_code_uri: https://github.com/reidmorrison/semantic_logger/tree/4.14.0
104
+ source_code_uri: https://github.com/reidmorrison/semantic_logger/tree/4.15.0
105
105
  rubygems_mfa_required: 'true'
106
106
  post_install_message:
107
107
  rdoc_options: []