Set defailt Vagrant log level

This commit is contained in:
sophia 2022-02-28 15:07:10 -06:00 committed by Paul Hinze
parent 0904996af1
commit 3516aa7131
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 6 additions and 9 deletions

View File

@ -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

View File

@ -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.

View File

@ -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!