Specify program names for previous logging locations
This commit is contained in:
parent
907c3b318a
commit
ad36340674
|
@ -6,7 +6,7 @@ env = Vagrant::Environment.new
|
||||||
|
|
||||||
begin
|
begin
|
||||||
# Begin logging early here
|
# Begin logging early here
|
||||||
env.logger.info "`vagrant` invoked: #{ARGV.inspect}"
|
env.logger.info("vagrant") { "`vagrant` invoked: #{ARGV.inspect}" }
|
||||||
|
|
||||||
# Disable color if the proper argument was passed
|
# Disable color if the proper argument was passed
|
||||||
shell = ARGV.include?("--no-color") ? Thor::Shell::Basic.new : Thor::Base.shell.new
|
shell = ARGV.include?("--no-color") ? Thor::Shell::Basic.new : Thor::Base.shell.new
|
||||||
|
|
|
@ -81,10 +81,10 @@ module Vagrant
|
||||||
@loaded = false
|
@loaded = false
|
||||||
@lock_acquired = false
|
@lock_acquired = false
|
||||||
|
|
||||||
logger.info "Environment initialized (#{self})"
|
logger.info("environment") { "Environment initialized (#{self})" }
|
||||||
logger.info " - cwd: #{cwd}"
|
logger.info("environment") { " - cwd: #{cwd}" }
|
||||||
logger.info " - parent: #{parent}"
|
logger.info("environment") { " - parent: #{parent}" }
|
||||||
logger.info " - vm: #{vm}"
|
logger.info("environment") { " - vm: #{vm}" }
|
||||||
end
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
|
@ -107,14 +107,14 @@ module Vagrant
|
||||||
return @_home_path if defined?(@_home_path)
|
return @_home_path if defined?(@_home_path)
|
||||||
|
|
||||||
@_home_path ||= Pathname.new(File.expand_path(ENV["VAGRANT_HOME"] || DEFAULT_HOME))
|
@_home_path ||= Pathname.new(File.expand_path(ENV["VAGRANT_HOME"] || DEFAULT_HOME))
|
||||||
logger.info "Home path: #{@_home_path}"
|
logger.info("environment") { "Home path: #{@_home_path}" }
|
||||||
|
|
||||||
# This is the old default that Vagrant used to be put things into
|
# This is the old default that Vagrant used to be put things into
|
||||||
# up until Vagrant 0.8.0. We keep around an automatic migration
|
# up until Vagrant 0.8.0. We keep around an automatic migration
|
||||||
# script here in case any old users upgrade.
|
# script here in case any old users upgrade.
|
||||||
old_home = File.expand_path("~/.vagrant")
|
old_home = File.expand_path("~/.vagrant")
|
||||||
if File.exists?(old_home) && File.directory?(old_home)
|
if File.exists?(old_home) && File.directory?(old_home)
|
||||||
logger.info "Found both an old and new Vagrantfile. Migration initiated."
|
logger.info("environment") { "Found both an old and new Vagrantfile. Migration initiated." }
|
||||||
|
|
||||||
# We can't migrate if the home directory already exists
|
# We can't migrate if the home directory already exists
|
||||||
if File.exists?(@_home_path)
|
if File.exists?(@_home_path)
|
||||||
|
@ -404,11 +404,11 @@ module Vagrant
|
||||||
if !parent
|
if !parent
|
||||||
# We only need to check the virtualbox version once, so do it on
|
# We only need to check the virtualbox version once, so do it on
|
||||||
# the parent most environment and then forget about it
|
# the parent most environment and then forget about it
|
||||||
logger.info "Environment not loaded. Checking virtual box version..."
|
logger.info("environment") { "Environment not loaded. Checking virtual box version..." }
|
||||||
self.class.check_virtualbox!
|
self.class.check_virtualbox!
|
||||||
end
|
end
|
||||||
|
|
||||||
logger.info "Loading configuration..."
|
logger.info("environment") { "Loading configuration..." }
|
||||||
load_config!
|
load_config!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ module Vagrant
|
||||||
[:warn, :error, :info, :confirm].each do |method|
|
[:warn, :error, :info, :confirm].each do |method|
|
||||||
define_method(method) do |message|
|
define_method(method) do |message|
|
||||||
# Log normal console messages
|
# Log normal console messages
|
||||||
env.logger.info(message)
|
env.logger.info("ui") { message }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue