rack-log-request 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack-log-request/version.rb +1 -1
- data/lib/rack-log-request.rb +4 -2
- metadata +3 -3
data/lib/rack-log-request.rb
CHANGED
@@ -30,10 +30,12 @@ module Rack
|
|
30
30
|
|
31
31
|
def call(env)
|
32
32
|
t = Time.now
|
33
|
-
|
33
|
+
status, headers, response = @app.call(env)
|
34
34
|
@mongo_collection.insert({:request => env['REQUEST_URI'],
|
35
|
+
:status => status,
|
36
|
+
:size => response.body.size,
|
35
37
|
:millis => (Time.now - t)*1000})
|
36
|
-
return
|
38
|
+
return [status, headers, response]
|
37
39
|
end
|
38
40
|
|
39
41
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-log-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cyril Mougel
|