Logging statements to Vagrant::Machine

This commit is contained in:
Mitchell Hashimoto 2012-07-16 14:21:04 -07:00
parent 8f0375d7f3
commit aef2c5f48e
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,11 @@ module Vagrant
# @param [Environment] env The environment that this machine is a
# part of.
def initialize(name, provider_cls, config, box, env)
@logger = Log4r::Logger.new("vagrant::machine")
@logger.debug("Initializing machine: #{name}")
@logger.debug(" - Provider: #{provider_cls}")
@logger.debug(" - Box: #{box}")
@name = name
@box = box
@config = config
@ -47,6 +52,8 @@ module Vagrant
#
# @param [Symbol] name Name of the action to run.
def action(name)
@logger.debug("Calling action: #{name} on provider #{@provider}")
# Get the callable from the provider.
callable = @provider.action(name)