aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-10-28 23:37:59 -0700
committerelijah <elijah@riseup.net>2014-10-28 23:37:59 -0700
commitde1cd23905852cbdfdc39249ffa871c6ab0f22f0 (patch)
tree4e121348df54d017e853f6d106dc667c06cf167d
parent06463db7a6e68898015e4a2138d5554f6394d300 (diff)
downloadleap_cli-de1cd23905852cbdfdc39249ffa871c6ab0f22f0.tar.gz
leap_cli-de1cd23905852cbdfdc39249ffa871c6ab0f22f0.tar.bz2
properly debug Net::SSH based on -v log level
-rw-r--r--lib/leap_cli/util/remote_command.rb12
1 files changed, 11 insertions, 1 deletions
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/