add machine readable logging, action starts/ends
This commit is contained in:
parent
edffb130c3
commit
566e21d3fc
|
@ -107,7 +107,8 @@ module Vagrant
|
|||
@provider_config = provider_config
|
||||
@provider_name = provider_name
|
||||
@provider_options = provider_options
|
||||
@ui = Vagrant::UI::Prefixed.new(@env.ui, @name)
|
||||
@ui = @env.ui.is_a?(Vagrant::UI::MachineReadable) ? @env.ui.clone : Vagrant::UI::Prefixed.new(@env.ui, @name)
|
||||
@ui.opts[:target] = name
|
||||
@ui_mutex = Mutex.new
|
||||
|
||||
# Read the ID, which is usually in local storage
|
||||
|
@ -188,7 +189,10 @@ module Vagrant
|
|||
end
|
||||
|
||||
# Call the action
|
||||
action_raw(name, callable, extra_env)
|
||||
ui.machine("action", name.to_s, "start")
|
||||
action_result = action_raw(name, callable, extra_env)
|
||||
ui.machine("action", name.to_s, "end")
|
||||
action_result
|
||||
end
|
||||
rescue Errors::EnvironmentLockedError
|
||||
raise Errors::MachineActionLockedError,
|
||||
|
|
Loading…
Reference in New Issue