Set defailt Vagrant log level
This commit is contained in:
parent
0904996af1
commit
3516aa7131
@ -247,9 +247,6 @@ func logger(args []string) ([]string, hclog.Logger, io.Writer, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Set default log level
|
||||
_ = os.Setenv("VAGRANT_LOG", "fatal")
|
||||
|
||||
// Process arguments looking for `-v` flags to control the log level.
|
||||
// This overrides whatever the env var set.
|
||||
var outArgs []string
|
||||
|
||||
@ -77,7 +77,7 @@ module Vagrant
|
||||
#
|
||||
# @return [String]
|
||||
def self.log_level
|
||||
ENV["VAGRANT_LOG"]
|
||||
ENV.fetch("VAGRANT_LOG", "fatal").downcase
|
||||
end
|
||||
|
||||
# Returns the URL prefix to the server.
|
||||
|
||||
@ -12,11 +12,6 @@ module VagrantPlugins
|
||||
DESC
|
||||
|
||||
command(:cloud) do
|
||||
# Set this to match Vagant logging level so we get
|
||||
# desired request/response information within the
|
||||
# logger output
|
||||
ENV["VAGRANT_CLOUD_LOG"] = Vagrant.log_level
|
||||
|
||||
require_relative "root"
|
||||
init!
|
||||
Command::Root
|
||||
@ -35,6 +30,11 @@ module VagrantPlugins
|
||||
protected
|
||||
|
||||
def self.init!
|
||||
# Set this to match Vagant logging level so we get
|
||||
# desired request/response information within the
|
||||
# logger output
|
||||
ENV["VAGRANT_CLOUD_LOG"] = Vagrant.log_level
|
||||
|
||||
return if defined?(@_init)
|
||||
I18n.load_path << File.expand_path("../locales/en.yml", __FILE__)
|
||||
I18n.reload!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user