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 +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +1 -1
- data/lib/log_toolbox/lograge_config.rb +8 -4
- data/lib/log_toolbox/version.rb +1 -1
- data/log_toolbox.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab0e7bb99fb882d6fb319bdf16d5ca7b8de205e9677243f800039edc4315d40d
|
4
|
+
data.tar.gz: 28224f5e7491173fc44311c4f4a7009ef2a180bc7f2695f02c1f4f937178607b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7da32d0ba5678d102d4c4930b5ec1cc972f6cbcfcd8dd9b0ff1c39d16e7e8cc187058d7869c76d10ed0c2bebe8687ea9569c58c9150cac56affd2b6669c1d3a7
|
7
|
+
data.tar.gz: 6834670ca4f7a6396903789124382a43e8d3f1d550d1e9ef6039ef8d16aacaf3dcdfa08145121af7e895f8f767f3028784bdcbf1dec7ba34418a086cc66d166e
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/Gemfile.lock
CHANGED
@@ -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']
|
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.
|
32
|
-
|
33
|
-
|
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
|
data/lib/log_toolbox/version.rb
CHANGED
data/log_toolbox.gemspec
CHANGED
@@ -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.
|
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.
|
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
|
+
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.
|
237
|
+
version: 2.5.0
|
238
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
239
|
requirements:
|
240
240
|
- - ">="
|