From fb875ab6429b34476c05668939a3f4982f72870d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 22 Jan 2013 12:13:42 -0800 Subject: [PATCH] Better logging in the GracefulHalt middleware --- lib/vagrant/action/builtin/graceful_halt.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/vagrant/action/builtin/graceful_halt.rb b/lib/vagrant/action/builtin/graceful_halt.rb index 3d6ca7fec..832695ff4 100644 --- a/lib/vagrant/action/builtin/graceful_halt.rb +++ b/lib/vagrant/action/builtin/graceful_halt.rb @@ -57,6 +57,12 @@ module Vagrant # The result of this matters on whether we reached our # proper target state or not. env[:result] = env[:machine].state.id == @target_state + + if env[:result] + @logger.info("Gracefully halted.") + else + @logger.info("Graceful halt failed.") + end end @app.call(env)