civo-logger 0.2.4 → 0.2.5
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 -0
- 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: e6491505ef84412b4fb86abdd78e068d78c095e6
|
4
|
+
data.tar.gz: 8d6d07286fa47ee87bf6d6eaafca9c6f9bdbddbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79b2c9b432c5c5b36ac51577338e9cf1b4567087bd00e5e63ef7bf1da92b3fe66c4f56916eaaff61970515eca0148a760c46571f43111a8cd53054783ce0abe2
|
7
|
+
data.tar.gz: 0754bf8ca015c5aa3413fb8cce50e08d6b99d6ea75c1450fba0104f18d72f71724a6857ec42a5d98405046cc3d14303a2e1230b66bbda295acccf9b723f73bcf
|
@@ -111,6 +111,12 @@ module Civo
|
|
111
111
|
|
112
112
|
def end_worker
|
113
113
|
puts @lines.join("\n") if Rails.env.production?
|
114
|
+
|
115
|
+
if @redis.nil?
|
116
|
+
puts @log
|
117
|
+
return
|
118
|
+
end
|
119
|
+
|
114
120
|
@redis.set("#{app_name}:log:#{@key}", @lines.join("\n"), ex: self.class.expires_in)
|
115
121
|
rescue Redis::TimeoutError, Redis::CannotConnectError => e
|
116
122
|
puts "ERROR! Redis error #{e.message}"
|
@@ -188,6 +194,11 @@ module Civo
|
|
188
194
|
@output = body.to_s
|
189
195
|
end
|
190
196
|
|
197
|
+
if @redis.nil?
|
198
|
+
puts @log
|
199
|
+
return
|
200
|
+
end
|
201
|
+
|
191
202
|
@redis.set("#{app_name}:log:#{@key}", @log[0, 65535], ex: self.class.expires_in)
|
192
203
|
@redis.set("#{app_name}:log-output:#{@key}", @output, ex: self.class.expires_in)
|
193
204
|
|
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.2.
|
4
|
+
version: 0.2.5
|
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
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|