civo-logger 0.3.9 → 0.4.0

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: c9c8b0fbd4d8428fc8948619c3b510b4b4f4651f
4
- data.tar.gz: dc39be0892bf282ee35ff5090e6dd1672af0388c
3
+ metadata.gz: ebaede81e6c0dae546b548f8d7a0d515439a4ca8
4
+ data.tar.gz: ba4e28528b067abfae38a5100f6d479698d44c1e
5
5
  SHA512:
6
- metadata.gz: f6bf044d480cc6446dea3e29927730f26ac95bedb9b525580a857541b1733b14d4aadd7f563009e5f2126979ba1ef3437ec2c2fc2e00ed86096813f6de2d3325
7
- data.tar.gz: 7bab19daf65918fcc9908dcf91c428f182b9a503bf39477d7c23faa5d2bd6166de981716a398c0b821988ff1ba64101f01798620c174d5885b67e182f157b9c8
6
+ metadata.gz: c72a7a552dd4a4f5c4c218139a0ae23aee38d6170841b37f0beeb8b429ecfb5d81568ae99e00a4f8bb7548d41f424339ed170b4131543f130840c74ea4559d2a
7
+ data.tar.gz: 6717749e16f0e54ff63c5a64b0dd3c30f5ecd943606cb334fd284faad2d200644e3be142ba1e3fa1727866de439c037751904eff7df0521094b484acfda09507
@@ -17,9 +17,9 @@ module Civo
17
17
  self.class.expires_in ||= 24.hours.to_i
18
18
  @app = app
19
19
  @taggers = taggers || []
20
- Rails.logger = ActionController::Base.logger = ActiveRecord::Base.logger = self
21
- $stdout.sync = true
22
20
  if ENV["INFLUX_LOGGER_HOSTNAME"]
21
+ Rails.logger = ActionController::Base.logger = ActiveRecord::Base.logger = self
22
+ $stdout.sync = true
23
23
  options = {host: ENV["INFLUX_LOGGER_HOSTNAME"], port: ENV["INFLUX_LOGGER_PORT"], password: ENV["INFLUX_LOGGER_PASSWORD"], username: ENV["INFLUX_LOGGER_USERNAME"], open_timeout: 1, read_timeout: 1, timeout: 1, time_precision: "ms", retry: false}
24
24
  @influxdb = InfluxDB::Client.new ENV["INFLUX_LOGGER_DATABASE"], options
25
25
  else
@@ -140,7 +140,9 @@ module Civo
140
140
  private
141
141
 
142
142
  def call_app(request, env) # :doc:
143
- if send_request?(request)
143
+ if ENV["INFLUX_LOGGER_HOSTNAME"].blank?
144
+ @app.call(env)
145
+ elsif send_request?(request)
144
146
  puts "In send request"
145
147
  @lines = []
146
148
  @recording = true
@@ -1,5 +1,5 @@
1
1
  module Civo
2
2
  module Logger
3
- VERSION = "0.3.9"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries