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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbdaeafc4c65122d621041a0542b733b3e4d6258
4
- data.tar.gz: e13cdf14833132b1a4bd47391920e49c39b13876
3
+ metadata.gz: d505105fc58d75b9cbd2cab5291f8e79f215a6ce
4
+ data.tar.gz: d83b701450228158707a7f7b666125fb56aa608c
5
5
  SHA512:
6
- metadata.gz: e6cdefe4762c99e498fc806292a1358b6982a9f6fa4b26c9104321358286ef20839d9aeafbb2a25b76640b35147a4f70a588fc679f6b8f94b5b57bd9241f25ff
7
- data.tar.gz: 0bec5841fe6f459dd66244073b4b5f9f3f0d310ca3538ad5f4025bf4a962c3ee5d4a145d88396626bc3c021aac60bacee8d9c9f1bfa71d9af99f07ef8d95ac0c
6
+ metadata.gz: 3c77899847e1562010c0b6a4ba3fe9e343a53baa02e68d6ffb612348dd32447ce6caca927a38d487a0a1b3c1b5a8977756e1f351b17bf1d96ac37b8a7a4efbb7
7
+ data.tar.gz: f272f7c23857518f6aad25438161068d3db3d4feef141885c8058e70485329a06a12d85ead3e184c591d4efd88f539b5afbbd9f0ff48444dd8a47d3609ff3e98
@@ -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.downcase
81
+ case @output_type
81
82
  when 'tcp'
82
83
  write_to_tcp(json_data)
83
84
  when 'stdout'
@@ -1,3 +1,3 @@
1
1
  module RestashRails
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
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.3
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 00:00:00.000000000 Z
13
+ date: 2017-09-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler