restash_rails 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restash_rails/logger.rb +3 -2
- data/lib/restash_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d505105fc58d75b9cbd2cab5291f8e79f215a6ce
|
4
|
+
data.tar.gz: d83b701450228158707a7f7b666125fb56aa608c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c77899847e1562010c0b6a4ba3fe9e343a53baa02e68d6ffb612348dd32447ce6caca927a38d487a0a1b3c1b5a8977756e1f351b17bf1d96ac37b8a7a4efbb7
|
7
|
+
data.tar.gz: f272f7c23857518f6aad25438161068d3db3d4feef141885c8058e70485329a06a12d85ead3e184c591d4efd88f539b5afbbd9f0ff48444dd8a47d3609ff3e98
|
data/lib/restash_rails/logger.rb
CHANGED
@@ -11,7 +11,7 @@ module RestashRails
|
|
11
11
|
@logstash_host = configs[:host] || '127.0.0.1' #logstash host
|
12
12
|
@logstash_port = configs[:port].to_i || 5960 #logstash port
|
13
13
|
@app_name = configs[:app_name] || ENV['APP_NAME'] || Rails.application.class.name
|
14
|
-
@output_type = configs[:output_type] || 'tcp'
|
14
|
+
@output_type = (configs[:output_type] || 'tcp').to_s.downcase
|
15
15
|
#TCP connection timeouts in milliseconds
|
16
16
|
if configs[:timeout_options].present?
|
17
17
|
configs[:timeout_options].each{ |k,v| configs[:timeout_options][k] = v.to_f }
|
@@ -64,6 +64,7 @@ module RestashRails
|
|
64
64
|
log_message[:severity] = severity
|
65
65
|
log_message[:app_name] = app_name
|
66
66
|
log_message[:rails_env] = environment
|
67
|
+
log_message[:output_type] = @output_type
|
67
68
|
log_message.merge!(formatter.format_message(message))
|
68
69
|
log_message = log_message.with_indifferent_access
|
69
70
|
log_message[:log_tag] ||= :custom
|
@@ -77,7 +78,7 @@ module RestashRails
|
|
77
78
|
|
78
79
|
def write(data)
|
79
80
|
json_data = data.to_json
|
80
|
-
case @output_type
|
81
|
+
case @output_type
|
81
82
|
when 'tcp'
|
82
83
|
write_to_tcp(json_data)
|
83
84
|
when 'stdout'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restash_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dmitri86git
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-09-
|
13
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|