From 48f0a50e618aa06723d941064ee35818ae20caef Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 11 Dec 2011 16:37:33 -0800 Subject: [PATCH] More logging in SSH class --- lib/vagrant/ssh.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index f49a06a63..fb32e3708 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -117,6 +117,8 @@ module Vagrant # # @return [Boolean] def up? + @logger.debug("Checking whether SSH is up") + # We have to determine the port outside of the block since it uses # API calls which can only be used from the main thread in JRuby on # Windows @@ -127,11 +129,13 @@ module Vagrant execute(:timeout => @vm.config.ssh.timeout, :port => ssh_port) { |ssh| } end + @logger.info("SSH is up!") true rescue Net::SSH::AuthenticationFailed raise Errors::SSHAuthenticationFailed rescue Timeout::Error, Errno::ECONNREFUSED, Net::SSH::Disconnect, - Errors::SSHConnectionRefused + Errors::SSHConnectionRefused => e + @logger.info("SSH not up: #{e.inspect}") return false end