Merge pull request #10200 from chrisroberts/e-customized-logger

Remove sensitive values from logger output
This commit is contained in:
Chris Roberts 2018-09-11 10:45:08 -07:00 committed by GitHub
commit c29ff8b39b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -1,7 +1,16 @@
require "vagrant/shared_helpers"
require "rubygems"
require "log4r"
require "vagrant/util/credential_scrubber"
# Update the default formatter within the log4r library to ensure
# sensitive values are being properly scrubbed from logger data
class Log4r::BasicFormatter
alias_method :vagrant_format_object, :format_object
def format_object(obj)
Vagrant::Util::CredentialScrubber.desensitize(vagrant_format_object(obj))
end
end
require "vagrant/shared_helpers"
require "rubygems"
require "vagrant/util"
require "vagrant/plugin/manager"