Runner loggers now use their @runner.logger instead of "global" logger
This commit is contained in:
parent
470c8de099
commit
91ae6178df
|
@ -29,6 +29,14 @@ module Vagrant
|
|||
# Included so subclasses don't need to include it themselves.
|
||||
include Vagrant::Util
|
||||
|
||||
# A helper method for logging which simply gets the logger from
|
||||
# the runner. Since actions tend to log quite a bit, this
|
||||
# removes the need to prefix `logger` with `@runner` over and
|
||||
# over.
|
||||
def logger
|
||||
runner.logger
|
||||
end
|
||||
|
||||
# Initialization of the action, passing any arguments which may have
|
||||
# been given to the {Runner runner}. This method can be used by subclasses
|
||||
# to save any of the configuration options which are passed in.
|
||||
|
|
|
@ -56,7 +56,7 @@ module Vagrant
|
|||
# of a specific instance.
|
||||
attr_accessor :env
|
||||
|
||||
class <<self
|
||||
class << self
|
||||
# Returns an array of all created boxes, as strings.
|
||||
#
|
||||
# @return [Array<String>]
|
||||
|
@ -149,4 +149,4 @@ module Vagrant
|
|||
self.class.directory(env, self.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,6 +105,7 @@ class Test::Unit::TestCase
|
|||
mock_vm.stubs(:invoke_around_callback).yields
|
||||
mock_vm.stubs(:actions).returns([action])
|
||||
mock_vm.stubs(:env).returns(mock_environment)
|
||||
mock_vm.stubs(:logger).returns(Vagrant::ResourceLogger.new("mock", nil))
|
||||
|
||||
mock_ssh = Vagrant::SSH.new(mock_vm.env)
|
||||
mock_ssh.stubs(:execute)
|
||||
|
|
Loading…
Reference in New Issue