logworm_amqp 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -1
- data/Rakefile +1 -1
- data/lib/client/rack.rb +3 -3
- data/lib/client/rails.rb +3 -3
- data/logworm_amqp.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
+
v0.9.8
|
2
|
+
- Set ip address to HTTP_X_REAL_IP if present --otherwise, it is set to Heroku's internal routing machine
|
3
|
+
- Moved the return statement outside of the ensure block --see
|
4
|
+
http://blog.leshill.org/blog/2009/11/17/ensure-with-explicit-return.html
|
5
|
+
Thanks for Dave Brown @ Top Prospect for bringing the issue up
|
6
|
+
|
1
7
|
v0.9.7
|
2
8
|
- lw_query now accepts a TTL parameter -- 300 seconds by default, can be lowered up to 20 seconds min
|
3
9
|
- lw-compute now has a standard TTL of 60 seconds
|
4
10
|
- no longer preserves entries from one request to the other --made more sense when there were timeouts, but with AMQP we don't
|
5
11
|
expect to see so many of them. Fixes bugs with log_with_request calls as well.
|
6
12
|
- Adds a new optional field in the web_log table, :apache_log, a string with information about the HTTP request in
|
7
|
-
the regular Apache Log format (requested by Dave
|
13
|
+
the regular Apache Log format (requested by Dave Brown @ Top Prospect)
|
8
14
|
|
9
15
|
v0.9.6
|
10
16
|
- Preserves the order of desired fields in a query.
|
data/Rakefile
CHANGED
data/lib/client/rack.rb
CHANGED
@@ -24,16 +24,16 @@ module Logworm
|
|
24
24
|
status, response_headers, body = @app.call(env)
|
25
25
|
appTime = (Time.now - startTime)
|
26
26
|
ensure
|
27
|
-
log_request(env, status, response_headers, appTime)
|
28
|
-
return [status, response_headers, body]
|
27
|
+
log_request(env, status, response_headers, appTime || -1)
|
29
28
|
end
|
29
|
+
return [status, response_headers, body]
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
33
33
|
def log_request(env, status, response_headers, appTime)
|
34
34
|
method = env['REQUEST_METHOD']
|
35
35
|
path = env['PATH_INFO'] || env['REQUEST_PATH'] || "/"
|
36
|
-
ip = env['REMOTE_ADDR']
|
36
|
+
ip = env['HTTP_X_REAL_IP'] || env['REMOTE_ADDR']
|
37
37
|
http_headers = env.reject {|k,v| !(k.to_s =~ /^HTTP/) }
|
38
38
|
queue_size = env['HTTP_X_HEROKU_QUEUE_DEPTH'].nil? ? -1 : env['HTTP_X_HEROKU_QUEUE_DEPTH'].to_i
|
39
39
|
|
data/lib/client/rails.rb
CHANGED
@@ -66,9 +66,9 @@ if defined?(ActionController) and Rails::VERSION::STRING and Rails::VERSION::STR
|
|
66
66
|
response = process_without_logworm_log(request, response, method, *arguments)
|
67
67
|
appTime = (Time.now - startTime)
|
68
68
|
ensure
|
69
|
-
log_request(request, response, appTime)
|
70
|
-
return response
|
69
|
+
log_request(request, response, appTime || -1)
|
71
70
|
end
|
71
|
+
return response
|
72
72
|
end
|
73
73
|
alias_method_chain :process, :logworm_log
|
74
74
|
|
@@ -77,7 +77,7 @@ if defined?(ActionController) and Rails::VERSION::STRING and Rails::VERSION::STR
|
|
77
77
|
def log_request(request, response, appTime)
|
78
78
|
method = request.env['REQUEST_METHOD']
|
79
79
|
path = request.path.blank? ? "/" : request.path
|
80
|
-
ip = request.env['REMOTE_ADDR']
|
80
|
+
ip = request.env['HTTP_X_REAL_IP'] || request.env['REMOTE_ADDR']
|
81
81
|
http_headers = request.headers.reject {|k,v| !(k.to_s =~ /^HTTP/) }
|
82
82
|
status = response.status ? (response.status.is_a?(String) ? response.status[0..2].to_i : response.status.to_s.to_i) : -1
|
83
83
|
queue_size = request.env['HTTP_X_HEROKU_QUEUE_DEPTH'].blank? ? -1 : request.env['HTTP_X_HEROKU_QUEUE_DEPTH'].to_i
|
data/logworm_amqp.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{logworm_amqp}
|
5
|
-
s.version = "0.9.
|
5
|
+
s.version = "0.9.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Pomelo, LLC"]
|
9
|
-
s.date = %q{2010-09-
|
9
|
+
s.date = %q{2010-09-29}
|
10
10
|
s.description = %q{logworm - logging service}
|
11
11
|
s.email = %q{schapira@pomelollc.com}
|
12
12
|
s.executables = ["lw-compute", "lw-tail"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logworm_amqp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 8
|
10
|
+
version: 0.9.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pomelo, LLC
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-29 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|