Skip to content
Browse files

Verbose command execution log should be optional. Set :verbose_comman…

…d_log to true when you need it. Refs #178.
  • Loading branch information...
1 parent 7de5eb0 commit e9ba06f35484b7c21d207e7e02f90d521518356e @kenn kenn committed Mar 10, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −1 lib/capistrano/command.rb
  2. +5 −1 lib/capistrano/configuration/actions/invocation.rb
  3. +1 −1 test/configuration_test.rb
View
2 lib/capistrano/command.rb
@@ -219,7 +219,7 @@ def open_channels
command_line = [environment, shell, cmd].compact.join(" ")
ch[:command] = command_line
- logger.trace command_line, ch[:server] if logger
+ logger.trace command_line, ch[:server] if logger && options[:verbose_command_log]
ch.exec(command_line)
ch.send_data(options[:data]) if options[:data]
View
6 lib/capistrano/configuration/actions/invocation.rb
@@ -175,7 +175,11 @@ def run_tree(tree, options={}) #:nodoc:
execute_on_servers(options) do |servers|
targets = servers.map { |s| sessions[s] }
- Command.process(tree, targets, options.merge(:logger => logger))
+ Command.process(tree, targets, options.merge(
+ :logger => logger,
+ :verbose_command_log => fetch(:verbose_command_log, false)
+ )
+ )
end
end
View
2 test/configuration_test.rb
@@ -16,7 +16,7 @@ def test_connections_execution_loading_namespaces_roles_and_variables_modules_sh
process_args = Proc.new do |tree, session, opts|
tree.fallback.command == "echo 'hello world'" &&
session == [:session] &&
- opts == { :logger => @config.logger }
+ opts == { :logger => @config.logger, :verbose_command_log => false }
end
Capistrano::Command.expects(:process).with(&process_args)

0 comments on commit e9ba06f

Please sign in to comment.
Something went wrong with that request. Please try again.