civo-logger 0.1.7 → 0.1.8
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 +8 -4
- 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: 6ac4b004f1fa931f6c2a0ba80bd6a8a58c7e287c
|
|
4
|
+
data.tar.gz: 206c48e649d622fa2207e84d71285f265ff603cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67536c0ceddf6e46553c6cf5badbd09554d8a868ccac580cb33f6e46edb7339f063c75587f78d9165d3d5575309ada578c92cc01cad1aa77a9c6a4c8d4b84516
|
|
7
|
+
data.tar.gz: faf398eabb668adda2183870fe3f4fc7d238b74dde40b17017a18a70282352f9c1a628a5201714d374779ba6429b3218043e01e3001abe1f227e42c1d0d3a37d
|
|
@@ -14,7 +14,11 @@ 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
|
-
|
|
17
|
+
options = {host: ENV["RAILS_LOGGER_HOSTNAME"], port: Rails.application.config.x.redis_port, timeout: 1}
|
|
18
|
+
if ENV["RAILS_LOGGER_PASSWORD"].present?
|
|
19
|
+
options[:password] = ENV["RAILS_LOGGER_PASSWORD"]
|
|
20
|
+
end
|
|
21
|
+
@redis = Redis.new(options)
|
|
18
22
|
else
|
|
19
23
|
@redis = Redis.current
|
|
20
24
|
end
|
|
@@ -126,9 +130,9 @@ module Civo
|
|
|
126
130
|
instrumenter = ActiveSupport::Notifications.instrumenter
|
|
127
131
|
instrumenter.start "request.action_dispatch", request: request
|
|
128
132
|
logger.info { started_request_message(request) }
|
|
129
|
-
status, headers,
|
|
130
|
-
finish(request,
|
|
131
|
-
[status, headers,
|
|
133
|
+
status, headers, response = @app.call(env)
|
|
134
|
+
finish(request, response)
|
|
135
|
+
[status, headers, response]
|
|
132
136
|
rescue Exception => e
|
|
133
137
|
finish(request, e.message)
|
|
134
138
|
raise
|
data/lib/civo/logger/version.rb
CHANGED