Remove level conditional for RestClient logging

This commit is contained in:
Brian Cain 2018-09-12 14:31:12 -07:00
parent adefbbaf6e
commit f1bae9f1eb
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 5 additions and 6 deletions

View File

@ -68,12 +68,11 @@ if ENV["VAGRANT_LOG"] && ENV["VAGRANT_LOG"] != ""
date_pattern: "%F %T"
)
end
# Cloud gem uses RestClient to make HTTP requests, so
# log them if debug is enabled
if level == 1
require 'rest_client'
RestClient.log = logger
end
# Vagrant Cloud gem uses RestClient to make HTTP requests, so
# log them if debug is enabled and use Vagrants logger
require 'rest_client'
RestClient.log = logger
Log4r::Outputter.stderr.formatter = Vagrant::Util::LoggingFormatter.new(base_formatter)
logger = nil
end