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 +4 -4
- data/lib/civo/logger/middleware.rb +5 -3
- data/lib/civo/logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebaede81e6c0dae546b548f8d7a0d515439a4ca8
|
4
|
+
data.tar.gz: ba4e28528b067abfae38a5100f6d479698d44c1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/civo/logger/version.rb
CHANGED