Follow web role logs when no roles are specified
This commit is contained in:
@@ -143,13 +143,12 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
run_locally do
|
run_locally do
|
||||||
info "Following logs on #{MRSK.primary_host}..."
|
info "Following logs on #{MRSK.primary_host}..."
|
||||||
|
|
||||||
roles = MRSK.roles_on(MRSK.primary_host)
|
MRSK.specific_roles ||= ["web"]
|
||||||
|
role = MRSK.roles_on(MRSK.primary_host).first
|
||||||
|
|
||||||
roles.each do |role|
|
|
||||||
info MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
|
info MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
|
||||||
exec MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
|
exec MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
since = options[:since]
|
since = options[:since]
|
||||||
lines = options[:lines].presence || ((since || grep) ? nil : 100) # Default to 100 lines if since or grep isn't set
|
lines = options[:lines].presence || ((since || grep) ? nil : 100) # Default to 100 lines if since or grep isn't set
|
||||||
|
|||||||
Reference in New Issue
Block a user