civo-logger 0.1.6 → 0.1.7
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 +11 -10
- data/lib/civo/logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae3071165ff9f245f8f8dec0d2488d6191fec750
|
4
|
+
data.tar.gz: 07cee876d0c01326c028c03ca472730821ed12a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bdd7070b760d04209872c47f825a234df1b4d9c07909e2f56eeafc3da668bbc533d5c37394ddccb76545177d9ae6a83a22b04e39c01c238c60691422957dafb
|
7
|
+
data.tar.gz: ada5038f5fbfe9c42aa1534fb8d73c4aa91246469b625415aad33e974298d35d0359ff44ad562697d16e278f70c81086bb383161b24985fd0a6fc780d419a90b
|
@@ -127,7 +127,6 @@ module Civo
|
|
127
127
|
instrumenter.start "request.action_dispatch", request: request
|
128
128
|
logger.info { started_request_message(request) }
|
129
129
|
status, headers, body = @app.call(env)
|
130
|
-
body = body.to_a rescue [body.body]
|
131
130
|
finish(request, body)
|
132
131
|
[status, headers, body]
|
133
132
|
rescue Exception => e
|
@@ -164,17 +163,19 @@ module Civo
|
|
164
163
|
instrumenter.finish "request.action_dispatch", request: request
|
165
164
|
@log = @lines.join("\n")
|
166
165
|
|
167
|
-
if
|
168
|
-
|
169
|
-
|
170
|
-
|
166
|
+
if send_request?(request)
|
167
|
+
body = body.to_a rescue [body.body]
|
168
|
+
|
169
|
+
if body.respond_to?(:each)
|
170
|
+
@output = []
|
171
|
+
body.each do |line|
|
172
|
+
@output << line
|
173
|
+
end
|
174
|
+
@output = @output.join("\n")
|
175
|
+
else
|
176
|
+
@output = body.to_s
|
171
177
|
end
|
172
|
-
@output = @output.join("\n")
|
173
|
-
else
|
174
|
-
@output = body.to_s
|
175
|
-
end
|
176
178
|
|
177
|
-
if send_request?(request)
|
178
179
|
@redis.set("#{app_name}:log:#{@key}", @log[0, 65535], expires_in: 1.hour)
|
179
180
|
@redis.set("#{app_name}:log-output:#{@key}", @output, expires_in: 1.hour)
|
180
181
|
|
data/lib/civo/logger/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|