log_toolbox 1.3.4 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/Gemfile.lock +1 -1
- data/lib/log_toolbox/lograge_config.rb +9 -9
- 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: 0705a34a5c6aa86c59b0b3f3ecacb12cd9c3e797684526614b9a86e71a9c0612
|
4
|
+
data.tar.gz: 22e86528f06686f9bf49b1279983deb10bf14cc0fa1b1c251293e44a98dfd43d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800ff4be159ad2b1e025bab0bff56b4ecdebb6bb36ac2a98bd371305a343b2bf87dec6644cd804c751431cdfecccefb43d58230f1ab24763d37703a6ea03b4f0
|
7
|
+
data.tar.gz: ba2f61765b621dd425a41dce2e050a57152a15dfe947af982f69b8cb7041a490a5fb608544a2ff6ecdc6f80f283fe47d80dd30683fe3889517d9f5a24d51792a
|
data/CHANGELOG.md
CHANGED
@@ -6,8 +6,28 @@ 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.9] - 2021-01-15
|
10
|
+
### FIXED
|
11
|
+
- Fixed service_name custom option.
|
12
|
+
|
13
|
+
## [1.3.8] - 2020-12-10
|
14
|
+
### FIXED
|
15
|
+
- Fixed LogStash configs
|
16
|
+
|
17
|
+
## [1.3.7] - 2020-12-08
|
18
|
+
### Added
|
19
|
+
- Configure log output stdout to development and test environment
|
20
|
+
|
21
|
+
## [1.3.6] - 2020-12-08
|
22
|
+
### FIXED
|
23
|
+
- Added buffer_max_items and buffer_max_interval into LogStash config
|
24
|
+
|
25
|
+
## [1.3.5] - 2020-12-04
|
26
|
+
### FIXED
|
27
|
+
- Convert buffer_max_items and buffer_max_interval values to integer
|
28
|
+
|
9
29
|
## [1.3.4] - 2020-12-03
|
10
|
-
###
|
30
|
+
### Added
|
11
31
|
- Add settings to buffer_max_items and buffer_max_interval
|
12
32
|
|
13
33
|
## [1.3.3] - 2020-11-25
|
data/Gemfile.lock
CHANGED
@@ -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
|
14
|
-
LOGSTASH_BUFFER_MAX_INTERVAL = ENV
|
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']
|
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
|
@@ -30,11 +30,11 @@ module LogToolbox
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def configure_log_output_logstash
|
33
|
-
config.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
38
38
|
end
|
39
39
|
|
40
40
|
def configure_log_output_stdout
|
@@ -56,7 +56,7 @@ module LogToolbox
|
|
56
56
|
event_at: event.payload[:event_at],
|
57
57
|
parameters: event.payload[:params].to_json,
|
58
58
|
level: 'INFO',
|
59
|
-
service_name: event.payload[:service_name],
|
59
|
+
service_name: event.payload[:service_name] || LogUtil.system_service_name,
|
60
60
|
version: event.payload[:version],
|
61
61
|
origin_ipv4: event.payload[:origin_ipv4],
|
62
62
|
destination_ipv4: event.payload[:destination_ipv4],
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caio Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-15 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
|
- - ">="
|