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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/log_toolbox/lograge_config.rb +5 -5
- data/lib/log_toolbox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f24d53b86979a1060c9a087c3c65b94c7f25bd6f4303edc63199e79580e2ba
|
4
|
+
data.tar.gz: cacbfcf42a486458d6c949b2dbd2829baaf6d46a5e3b2873ec74cbd430a4424a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24d0cb468176260e5ebe240d6f5559efdcc1602f58a43152cacb866c8a29e90cd69b100393b551d106eeb6f0c3f2f52fe4bdee82f11ff674f25b7157f0260c7a
|
7
|
+
data.tar.gz: a08c22ec7826cf3860fa08d7f8a63c671146b6f6331cf59a0a1fa1c91a02cbe234402bf94f2bda73d8e511c254e8f8a8654608908de20839fd4131bbe9f24a5e
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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
|
@@ -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
|
38
|
-
config.logstash.buffer_max_interval = LOGSTASH_BUFFER_MAX_INTERVAL
|
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
|
data/lib/log_toolbox/version.rb
CHANGED