tail-cf-plugin 0.0.12.pre → 0.0.13.pre
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,9 +20,14 @@ module TailCfPlugin
|
|
20
20
|
request = Net::HTTP::Get.new uri.request_uri
|
21
21
|
output.puts "Connected to #{loggregator_host}"
|
22
22
|
http.request request do |response|
|
23
|
-
response.
|
24
|
-
|
25
|
-
|
23
|
+
case response.code.to_i
|
24
|
+
when 200
|
25
|
+
response.read_body do |chunk|
|
26
|
+
received_message = LogMessage.decode(chunk)
|
27
|
+
output.puts([received_message.app_id, received_message.source_id, received_message.message_type_name, received_message.message].join(" "))
|
28
|
+
end
|
29
|
+
else
|
30
|
+
output.puts("Error #{response.code}: #{response.body}")
|
26
31
|
end
|
27
32
|
end
|
28
33
|
end
|