Provisioners use new logger on environment
This commit is contained in:
parent
6e757e7ab7
commit
504b709f2d
|
@ -26,12 +26,12 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
if vm.created?
|
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
|
vm.start
|
||||||
else
|
else
|
||||||
vm.env.require_box
|
vm.env.require_box
|
||||||
|
|
||||||
logger.info "Creating VM '#{name}'"
|
vm.env.logger.info "Creating VM '#{name}'"
|
||||||
vm.up
|
vm.up
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,6 +22,12 @@ module Vagrant
|
||||||
@vm.env
|
@vm.env
|
||||||
end
|
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
|
# 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}).
|
# 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
|
# This can be used to setup shared folders, forward ports, etc. Whatever is
|
||||||
|
@ -34,4 +40,4 @@ module Vagrant
|
||||||
def provision!; end
|
def provision!; end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue