rack-log-request 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack-log-request.rb +2 -2
- data/lib/rack-log-request/version.rb +1 -1
- metadata +4 -4
data/lib/rack-log-request.rb
CHANGED
@@ -25,7 +25,7 @@ module Rack
|
|
25
25
|
else
|
26
26
|
@mongo_database = options[:mongo_db]
|
27
27
|
end
|
28
|
-
@mongo_collection = @mongo_database.
|
28
|
+
@mongo_collection = @mongo_database.create_collection('rack-log-request', {:capped => true, :size => 100, :max => 10})
|
29
29
|
end
|
30
30
|
|
31
31
|
def call(env)
|
@@ -33,7 +33,7 @@ module Rack
|
|
33
33
|
status, headers, response = @app.call(env)
|
34
34
|
@mongo_collection.insert({:request => env['REQUEST_URI'],
|
35
35
|
:status => status,
|
36
|
-
:size =>
|
36
|
+
:size => headers['Content-Length'],
|
37
37
|
:millis => (Time.now - t)*1000})
|
38
38
|
return [status, headers, response]
|
39
39
|
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cyril Mougel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|