log_toolbox 1.3.3 → 1.3.8

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: 24e688450de60928e21dffc4f149fad36b8fdcccbc99c66a7490f8a7c120f26e
4
- data.tar.gz: 906faf4de7058fd15a773dfd1e329642a912e09c4c7b7a7cebdf7d69f395be87
3
+ metadata.gz: ab0e7bb99fb882d6fb319bdf16d5ca7b8de205e9677243f800039edc4315d40d
4
+ data.tar.gz: 28224f5e7491173fc44311c4f4a7009ef2a180bc7f2695f02c1f4f937178607b
5
5
  SHA512:
6
- metadata.gz: 3306c7347f81a106a9d591c56462b9cd63edde7247a6c66ae0137eebda42dcb0db491e37415e71cf917248c1a7f2a389eb423642d9bf820bd809f590ce0ecbbb
7
- data.tar.gz: d4aeec51d7a437a6124b64d15ed502cea87ec9f52780abc9f9959cd884e2a52724040104a130668c1d170c10831bd95d6b3243841fb22365d17e8d9fc71afff8
6
+ metadata.gz: 7da32d0ba5678d102d4c4930b5ec1cc972f6cbcfcd8dd9b0ff1c39d16e7e8cc187058d7869c76d10ed0c2bebe8687ea9569c58c9150cac56affd2b6669c1d3a7
7
+ data.tar.gz: 6834670ca4f7a6396903789124382a43e8d3f1d550d1e9ef6039ef8d16aacaf3dcdfa08145121af7e895f8f767f3028784bdcbf1dec7ba34418a086cc66d166e
@@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Released] - 2019-05-21
8
8
 
9
+
10
+ ## [1.3.8] - 2020-12-10
11
+ ### FIXED
12
+ - Fixed LogStash configs
13
+
14
+ ## [1.3.7] - 2020-12-08
15
+ ### Added
16
+ - Configure log output stdout to development and test environment
17
+
18
+ ## [1.3.6] - 2020-12-08
19
+ ### FIXED
20
+ - Added buffer_max_items and buffer_max_interval into LogStash config
21
+
22
+ ## [1.3.5] - 2020-12-04
23
+ ### FIXED
24
+ - Convert buffer_max_items and buffer_max_interval values to integer
25
+
26
+ ## [1.3.4] - 2020-12-03
27
+ ### Added
28
+ - Add settings to buffer_max_items and buffer_max_interval
29
+
9
30
  ## [1.3.3] - 2020-11-25
10
31
  ### Added
11
32
  - Parametrize logstash protocol
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- log_toolbox (1.3.3)
4
+ log_toolbox (1.3.5)
5
5
  lograge (>= 0.11.1)
6
6
  logstash-event (>= 1.2.02)
7
7
  logstash-logger (>= 0.26.1)
@@ -10,12 +10,14 @@ module LogToolbox
10
10
  LOGSTASH_URL = ENV['LOGSTASH_URL']
11
11
  LOGSTASH_PORT = ENV['LOGSTASH_PORT']
12
12
  LOGSTASH_PROTOCOL = ENV.fetch('LOGSTASH_PROTOCOL', 'udp')
13
+ LOGSTASH_BUFFER_MAX_ITEMS = ENV.fetch('LOGSTASH_BUFFER_MAX_ITEMS', 50).to_i
14
+ LOGSTASH_BUFFER_MAX_INTERVAL = ENV.fetch('LOGSTASH_BUFFER_MAX_INTERVAL', 5).to_i
13
15
 
14
16
  def self.configure
15
17
  Rails.application.configure do
16
18
  log_config = LogToolbox::LogrageConfig.new(config)
17
19
  log_config.configure_log_format
18
- if ENV['RAILS_ENV'] == 'development'
20
+ if %w[development test].include?(ENV['RAILS_ENV'])
19
21
  log_config.configure_log_output_stdout
20
22
  else
21
23
  log_config.configure_log_output_logstash
@@ -28,9 +30,11 @@ module LogToolbox
28
30
  end
29
31
 
30
32
  def configure_log_output_logstash
31
- config.logger = LogStashLogger.new(type: LOGSTASH_PROTOCOL,
32
- host: LOGSTASH_URL,
33
- port: LOGSTASH_PORT)
33
+ config.logstash.type = LOGSTASH_PROTOCOL
34
+ config.logstash.host = LOGSTASH_URL
35
+ config.logstash.port = LOGSTASH_PORT
36
+ config.logstash.buffer_max_items = LOGSTASH_BUFFER_MAX_ITEMS
37
+ config.logstash.buffer_max_interval = LOGSTASH_BUFFER_MAX_INTERVAL
34
38
  end
35
39
 
36
40
  def configure_log_output_stdout
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LogToolbox
4
- VERSION = '1.3.3'
4
+ VERSION = '1.3.8'
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ['Caio Almeida']
12
12
  spec.email = ['cbalmeida@guide.com.br']
13
13
 
14
- spec.required_ruby_version = '>= 2.4.0'
14
+ spec.required_ruby_version = '>= 2.5.0'
15
15
  spec.summary = 'Guide default gem for ruby application logging'
16
16
  spec.homepage = 'http://bitbucket.org/guideinvestimentos/log_toolbox'
17
17
  spec.license = 'Guide'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio Almeida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-27 00:00:00.000000000 Z
11
+ date: 2020-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lograge
@@ -234,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
234
  requirements:
235
235
  - - ">="
236
236
  - !ruby/object:Gem::Version
237
- version: 2.4.0
237
+ version: 2.5.0
238
238
  required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  requirements:
240
240
  - - ">="