ocean-rails 1.29.6 → 1.29.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/selective_rack_logger.rb +12 -2
- data/lib/ocean/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: 438f3fc7dd3a7df2f2021de6ca28934ba418e913
|
4
|
+
data.tar.gz: 4231a54ad8f6545f1008e632fdccd0d86ef52cbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4856a2329dbcd6cc5a7894cefa76e8541d56b75a3d508ef90f43a2c1e4a05666e4782fad34e9b0ae56f84c143cebf94d96f4b2b43b3913eedcc3458191e96a
|
7
|
+
data.tar.gz: e3cc8912f91edee0a67c3b3794b1ccbe72fc1706720ccbb944f02e4ef7b9b8ec25c2313e78b9df5099b45633aec479183bad72908c35e8168bd122f0afa0cc70
|
@@ -29,15 +29,26 @@ class SelectiveRackLogger < Rails::Rack::Logger
|
|
29
29
|
super(env) # returns [..., ..., ...]
|
30
30
|
end
|
31
31
|
end
|
32
|
+
end
|
33
|
+
|
32
34
|
|
35
|
+
class Rails::Rack::Logger
|
33
36
|
|
34
37
|
protected
|
35
38
|
|
39
|
+
#
|
40
|
+
# Monkey patch: no started_request_message logged in production.
|
41
|
+
#
|
36
42
|
def call_app(request, env)
|
37
|
-
|
43
|
+
# Put some space between requests in development logs.
|
44
|
+
if development?
|
45
|
+
logger.debug ''
|
46
|
+
logger.debug ''
|
47
|
+
end
|
38
48
|
|
39
49
|
instrumenter = ActiveSupport::Notifications.instrumenter
|
40
50
|
instrumenter.start 'request.action_dispatch', request: request
|
51
|
+
logger.info started_request_message(request) unless Rails.env.production?
|
41
52
|
resp = @app.call(env)
|
42
53
|
resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
|
43
54
|
resp
|
@@ -47,5 +58,4 @@ class SelectiveRackLogger < Rails::Rack::Logger
|
|
47
58
|
ensure
|
48
59
|
ActiveSupport::LogSubscriber.flush_all!
|
49
60
|
end
|
50
|
-
|
51
61
|
end
|
data/lib/ocean/version.rb
CHANGED