From de1cd23905852cbdfdc39249ffa871c6ab0f22f0 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 28 Oct 2014 23:37:59 -0700 Subject: properly debug Net::SSH based on -v log level --- lib/leap_cli/util/remote_command.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb index 6b4d75f..f4725de 100644 --- a/lib/leap_cli/util/remote_command.rb +++ b/lib/leap_cli/util/remote_command.rb @@ -78,10 +78,20 @@ module LeapCli; module Util; module RemoteCommand :keys_only => false, # Don't you dare change this. :global_known_hosts_file => path(:known_hosts), :user_known_hosts_file => '/dev/null', - :paranoid => true + :paranoid => true, + :verbose => net_ssh_log_level } end + def net_ssh_log_level + case LeapCli.log_level + when 0 then 3 + when 1 then 2 + when 2 then 1 + else 0 + end + end + # # For notes on advanced ways to set server-specific options, see # http://railsware.com/blog/2011/11/02/advanced-server-definitions-in-capistrano/ -- cgit v1.2.3