log_toolbox 1.3.6 → 1.3.7

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: 28a9c385547959933a5c5fdb1d3ee5599c915f74a1a3ad6355dd8409a3bc20c7
4
- data.tar.gz: e5ba4e9d8a3a01b7a036589d29e0cc6df79eb6f527f8816b80491d019f96d41c
3
+ metadata.gz: 63f24d53b86979a1060c9a087c3c65b94c7f25bd6f4303edc63199e79580e2ba
4
+ data.tar.gz: cacbfcf42a486458d6c949b2dbd2829baaf6d46a5e3b2873ec74cbd430a4424a
5
5
  SHA512:
6
- metadata.gz: b9816f33487576697c9c6dd8581ad0ed8ecc098ad5bd5250bf750319bfce571a17c700a0c81514af1d64742ab8facd28fd6d9991f941951b962447c5ddb3afa8
7
- data.tar.gz: 899d9b23415f164ad5daa3315fb39a75287f5336a6f684493753d0c8400182b77afa0caaf9525c9057d7d116915b4efcd507bc3377c6b96ca02de54de9fa7f98
6
+ metadata.gz: 24d0cb468176260e5ebe240d6f5559efdcc1602f58a43152cacb866c8a29e90cd69b100393b551d106eeb6f0c3f2f52fe4bdee82f11ff674f25b7157f0260c7a
7
+ data.tar.gz: a08c22ec7826cf3860fa08d7f8a63c671146b6f6331cf59a0a1fa1c91a02cbe234402bf94f2bda73d8e511c254e8f8a8654608908de20839fd4131bbe9f24a5e
@@ -6,6 +6,10 @@ 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
+ ## [1.3.7] - 2020-12-04
10
+ ### Added
11
+ - Configure log output stdout to development and test environment
12
+
9
13
  ## [1.3.6] - 2020-12-04
10
14
  ### FIXED
11
15
  - Added buffer_max_items and buffer_max_interval into LogStash config
@@ -10,14 +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['LOGSTASH_BUFFER_MAX_ITEMS'].to_i
14
- LOGSTASH_BUFFER_MAX_INTERVAL = ENV['LOGSTASH_BUFFER_MAX_INTERVAL'].to_i
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
15
15
 
16
16
  def self.configure
17
17
  Rails.application.configure do
18
18
  log_config = LogToolbox::LogrageConfig.new(config)
19
19
  log_config.configure_log_format
20
- if ENV['RAILS_ENV'] == 'development'
20
+ if %w[development test].include?(ENV['RAILS_ENV'])
21
21
  log_config.configure_log_output_stdout
22
22
  else
23
23
  log_config.configure_log_output_logstash
@@ -34,8 +34,8 @@ module LogToolbox
34
34
  host: LOGSTASH_URL,
35
35
  port: LOGSTASH_PORT)
36
36
 
37
- config.logstash.buffer_max_items = LOGSTASH_BUFFER_MAX_ITEMS || 50
38
- config.logstash.buffer_max_interval = LOGSTASH_BUFFER_MAX_INTERVAL || 5
37
+ config.logstash.buffer_max_items = LOGSTASH_BUFFER_MAX_ITEMS
38
+ config.logstash.buffer_max_interval = LOGSTASH_BUFFER_MAX_INTERVAL
39
39
  end
40
40
 
41
41
  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.6'
4
+ VERSION = '1.3.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio Almeida