tail-cf-plugin 0.0.15.pre → 0.0.16.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module TailCfPlugin
5
5
  end
6
6
 
7
7
  def listen(loggregator_host, space_id, app_id, user_token)
8
- websocket_address = "wss://#{loggregator_host}/tail/spaces/#{space_id}"
8
+ websocket_address = "wss://#{loggregator_host}:4443/tail/spaces/#{space_id}"
9
9
  websocket_address += "/apps/#{app_id}" if app_id
10
10
 
11
11
  websocket_address += "?authorization=#{URI.encode(user_token)}"
@@ -13,6 +13,10 @@ module TailCfPlugin
13
13
  EM.run {
14
14
  ws = Faye::WebSocket::Client.new(websocket_address, nil, :headers => {"Origin" => "http://localhost"})
15
15
 
16
+ ws.on :open do |event|
17
+ output.puts("Connected to server.")
18
+ end
19
+
16
20
  ws.on :message do |event|
17
21
  received_message = LogMessage.decode(event.data.pack("C*"))
18
22
  output.puts([received_message.app_id, received_message.source_id, received_message.message_type_name, received_message.message].join(" "))
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.15.pre
4
+ version: 0.0.16.pre
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors: