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.read_body do |chunk|
24
- received_message = LogMessage.decode(chunk)
25
- output.puts([received_message.app_id, received_message.source_id, received_message.message_type_name, received_message.message].join(" "))
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tail-cf-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12.pre
4
+ version: 0.0.13.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors: