diff --git a/lib/vagrant/commands/up.rb b/lib/vagrant/commands/up.rb index 41336ece7..b71cf95fd 100644 --- a/lib/vagrant/commands/up.rb +++ b/lib/vagrant/commands/up.rb @@ -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 diff --git a/lib/vagrant/provisioners/base.rb b/lib/vagrant/provisioners/base.rb index 79b675576..f393e2152 100644 --- a/lib/vagrant/provisioners/base.rb +++ b/lib/vagrant/provisioners/base.rb @@ -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 @@ -34,4 +40,4 @@ module Vagrant def provision!; end end end -end \ No newline at end of file +end