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 # @param [Environment] env The environment that this machine is a
# part of. # part of.
def initialize(name, provider_cls, config, box, env) 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 @name = name
@box = box @box = box
@config = config @config = config
@ -47,6 +52,8 @@ module Vagrant
# #
# @param [Symbol] name Name of the action to run. # @param [Symbol] name Name of the action to run.
def action(name) def action(name)
@logger.debug("Calling action: #{name} on provider #{@provider}")
# Get the callable from the provider. # Get the callable from the provider.
callable = @provider.action(name) callable = @provider.action(name)