Merge pull request #5110 from mitchellh/sethvargo/atlas_log

Turn on Atlas debug logging if Vagrant is logging
This commit is contained in:
Seth Vargo 2015-01-05 16:13:29 -05:00
commit 0c2c6113f7
2 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,13 @@ module Vagrant
!!ENV["VAGRANT_I_KNOW_WHAT_IM_DOING_PLEASE_BE_QUIET"]
end
# The current log level for Vagrant
#
# @return [String]
def self.log_level
ENV["VAGRANT_LOG"]
end
# Returns the URL prefix to the server.
#
# @return [String]

View File

@ -23,6 +23,7 @@ module VagrantPlugins
# if we're on a system that doesn't support exec, so handle that properly.
def execute(uploader)
cmd = []
cmd << "-debug" if !Vagrant.log_level.nil?
cmd << "-vcs" if config.vcs
cmd += config.includes.map { |v| ["-include", v] }
cmd += config.excludes.map { |v| ["-exclude", v] }