tail-cf-plugin 0.0.10.pre → 0.0.11.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.
File without changes
|
@@ -3,7 +3,7 @@ require 'faye/websocket'
|
|
3
3
|
require 'eventmachine'
|
4
4
|
|
5
5
|
module TailCfPlugin
|
6
|
-
require 'tail-cf-plugin/
|
6
|
+
require 'tail-cf-plugin/loggregrator_client'
|
7
7
|
require 'log_message/log_message.pb'
|
8
8
|
|
9
9
|
class Plugin < CF::CLI
|
@@ -11,6 +11,7 @@ module TailCfPlugin
|
|
11
11
|
|
12
12
|
desc "Tail logs for CF applications or spaces"
|
13
13
|
group :apps
|
14
|
+
input :loggregator_host, :argument => :required, :desc => "The ip:port of the loggregator"
|
14
15
|
input :app, :desc => "App to tail logs from", :argument => :optional, :from_given => by_name(:app)
|
15
16
|
input :space, :type => :boolean, :desc => "Logs of all apps in the current space", :default => false
|
16
17
|
|
@@ -25,18 +26,11 @@ module TailCfPlugin
|
|
25
26
|
app_guid = input[:app].guid
|
26
27
|
end
|
27
28
|
|
28
|
-
|
29
|
-
|
29
|
+
loggregrator_client = LoggregatorClient.new(STDOUT)
|
30
|
+
loggregrator_client.listen(input[:loggregator_host], client.current_space.guid, app_guid, client.token.auth_header)
|
30
31
|
end
|
31
32
|
|
32
33
|
::ManifestsPlugin.default_to_app_from_manifest(:tail, false)
|
33
34
|
|
34
|
-
private
|
35
|
-
|
36
|
-
def loggregator_host
|
37
|
-
target_base = client.target.sub(/^https?:\/\/([^\.]+\.)?(.+)\/?/, '\2')
|
38
|
-
"loggregator.#{target_base}"
|
39
|
-
end
|
40
|
-
|
41
35
|
end
|
42
36
|
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.
|
4
|
+
version: 0.0.11.pre
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -19,6 +19,9 @@ dependencies:
|
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 4.2.5
|
22
|
+
- - <
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '5.0'
|
22
25
|
type: :runtime
|
23
26
|
prerelease: false
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,6 +30,9 @@ dependencies:
|
|
27
30
|
- - ! '>='
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: 4.2.5
|
33
|
+
- - <
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '5.0'
|
30
36
|
- !ruby/object:Gem::Dependency
|
31
37
|
name: faye-websocket
|
32
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +72,7 @@ executables: []
|
|
66
72
|
extensions: []
|
67
73
|
extra_rdoc_files: []
|
68
74
|
files:
|
69
|
-
- lib/tail-cf-plugin/
|
75
|
+
- lib/tail-cf-plugin/loggregrator_client.rb
|
70
76
|
- lib/tail-cf-plugin/plugin.rb
|
71
77
|
- vendor/log_message/log_message.pb.rb
|
72
78
|
- vendor/log_message/log_message.proto
|