Provisioners use new logger on environment

This commit is contained in:
Mitchell Hashimoto 2010-05-20 20:44:58 -07:00
parent 6e757e7ab7
commit 504b709f2d
2 changed files with 9 additions and 3 deletions

View File

@ -26,12 +26,12 @@ module Vagrant
end
if vm.created?
logger.info "VM '#{name}' already created. Booting if its not already running..."
vm.env.logger.info "VM '#{name}' already created. Booting if its not already running..."
vm.start
else
vm.env.require_box
logger.info "Creating VM '#{name}'"
vm.env.logger.info "Creating VM '#{name}'"
vm.up
end
end

View File

@ -22,6 +22,12 @@ module Vagrant
@vm.env
end
# This method returns the environment's logger as a convenience
# method.
def logger
env.logger
end
# This is the method called to "prepare" the provisioner. This is called
# before any actions are run by the action runner (see {Vagrant::Actions::Runner}).
# This can be used to setup shared folders, forward ports, etc. Whatever is