civo-logger 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/civo/logger/middleware.rb +0 -5
- 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: 7279fc671bb4f72639b0a55999da868224ef580c
|
|
4
|
+
data.tar.gz: b7e3d445f7317efb9f75671033650dc47100c13b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89c05c183c50bfe7a11bf326a1e2b559ae07554b737f155f0d8d0d322982ea941a8740222bf88f8058a430877f578b0623273ab82d49083463318bc74dac89f4
|
|
7
|
+
data.tar.gz: 40a042984a983fe945f1fbedc71bfb18ae41eb8009a9a1aadbd6527ea7caf95b978895507aa7cef424b0b9153eab5a38a49785472b9591373026f405d0d0823f
|
|
@@ -14,7 +14,6 @@ module Civo
|
|
|
14
14
|
Rails.logger = ActionController::Base.logger = ActiveRecord::Base.logger = self
|
|
15
15
|
$stdout.sync = true
|
|
16
16
|
if ENV["RAILS_LOGGER_HOSTNAME"].present?
|
|
17
|
-
puts "Setting REDIS to the remote one"
|
|
18
17
|
@redis = Redis.new(host: ENV["RAILS_LOGGER_HOSTNAME"], port: Rails.application.config.x.redis_port, password: ENV["RAILS_LOGGER_PASSWORD"])
|
|
19
18
|
else
|
|
20
19
|
@redis = Redis.current
|
|
@@ -124,7 +123,6 @@ module Civo
|
|
|
124
123
|
instrumenter.start "request.action_dispatch", request: request
|
|
125
124
|
logger.info { started_request_message(request) }
|
|
126
125
|
resp = @app.call(env)
|
|
127
|
-
puts "HELLO!"
|
|
128
126
|
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request, resp[2]) }
|
|
129
127
|
resp
|
|
130
128
|
rescue Exception
|
|
@@ -171,12 +169,9 @@ module Civo
|
|
|
171
169
|
@output = body
|
|
172
170
|
end
|
|
173
171
|
|
|
174
|
-
puts "Should I send it? #{send_request?(request)}"
|
|
175
172
|
if send_request?(request)
|
|
176
|
-
puts "Sending... to #{@redis.inspect}"
|
|
177
173
|
@redis.set("civo-api:log:#{@key}", @log[0, 65535], expires_in: 1.hour)
|
|
178
174
|
@redis.set("civo-api:log-output:#{@key}", @output, expires_in: 1.hour)
|
|
179
|
-
puts "Yes, done!"
|
|
180
175
|
|
|
181
176
|
puts "#{request.request_method}-#{request.fullpath.gsub("/", "_")}-#{@output.length}-#{@status}-#{@time_taken}" if Rails.env.production?
|
|
182
177
|
|
data/lib/civo/logger/version.rb
CHANGED