logworm_amqp 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Rakefile +1 -1
- data/lib/base/db.rb +8 -8
- data/lib/cmd/tail.rb +10 -3
- data/logworm_amqp.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
v0.9.6
|
2
|
+
- Preserves the order of desired fields in a query.
|
3
|
+
- Handled an exception which was being thrown when the connection to the server could not be established.
|
4
|
+
|
1
5
|
v0.9.5
|
2
6
|
A few changes:
|
3
7
|
- Add support for log_environments(arr) configuration, to specify a list of environments in which logworm should log
|
data/Rakefile
CHANGED
data/lib/base/db.rb
CHANGED
@@ -128,12 +128,10 @@ module Logworm
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def to_amqp(queue, payload)
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
:env => ENV['RACK_ENV'] || "?"})
|
136
|
-
end
|
131
|
+
content = payload.to_json
|
132
|
+
sig= signature(content, @token_secret )
|
133
|
+
Minion.enqueue("#{@amqp_prefix}.#{queue}", {:payload => content, :consumer_key => @token, :signature => sig,
|
134
|
+
:env => ENV['RACK_ENV'] || "?"})
|
137
135
|
end
|
138
136
|
|
139
137
|
def recording_stats()
|
@@ -166,8 +164,10 @@ module Logworm
|
|
166
164
|
end
|
167
165
|
|
168
166
|
def batch_log(entries)
|
169
|
-
|
170
|
-
|
167
|
+
if get_amqp_url
|
168
|
+
recording_stats do
|
169
|
+
to_amqp("logging", {:entries => entries})
|
170
|
+
end
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
data/lib/cmd/tail.rb
CHANGED
@@ -92,12 +92,19 @@ class LogwormTail
|
|
92
92
|
end
|
93
93
|
last
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
def print_row(r)
|
97
|
+
|
98
|
+
if @options[:fields].size > 0
|
99
|
+
keys_to_print = @options[:fields]
|
100
|
+
else
|
101
|
+
keys_to_print = r.keys.sort
|
102
|
+
end
|
103
|
+
|
97
104
|
if @options[:flat]
|
98
|
-
puts "\t" +
|
105
|
+
puts "\t" + keys_to_print.map {|k| "#{k}: #{r[k].inspect}"}.join(', ')
|
99
106
|
else
|
100
|
-
|
107
|
+
keys_to_print.each do |k|
|
101
108
|
puts "\t#{k}: #{r[k].inspect}"
|
102
109
|
end
|
103
110
|
puts
|
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.6"
|
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-08-
|
9
|
+
s.date = %q{2010-08-24}
|
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: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 6
|
10
|
+
version: 0.9.6
|
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-08-
|
18
|
+
date: 2010-08-24 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|