tail-cf-plugin 0.0.12.pre → 0.0.13.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
|