Closed aphorise closed 1 year ago
A good work-around that's specific to versions: 2.x, prior to the yet to be released Vagrant 3.0 can be:
## Patch UI to hide detail messages
class Vagrant::UI::Colored
def say(type, message, opts={})
super(type, message, opts.merge(hide_detail: true))
end
end
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/vagrant-share"
end
Messages could be conditionally evaluated and reduced as part of this over-ride approach which strips all non-bold outputs when setting hide_detail: true
. The above approach is unlikely to work in Vagrant 3.0.
Thank you for your feedback and recommendation, however, due to limited resources we are unable to prioritize this new work in our sprints. We are now closing this issue so that it is not stagnate.
The best way to get this implemented would be to submit a PR. If you want to discuss how to open a PR, I'd be happy to help with that.
Again, thank you for your suggestion. This is also an open source project we welcome contributions. Thanks!
Provide additional parameters to disable and or reduce verbosity that's typically output as part of
vagrant up
and VM provisioning such as Network,Matching MAC address for NAT
,Forwarding Port
or SSH related events (before user scripts)The intent with this request is to reduce verbosity for the purposes of presentations and drawing attention to pertinent user events or those that may be considered a warning or error in prior steps.
Outputs from a
vagrant up
run that's preferred as reducible to error only events and not always outputting - will be demonstrated below using double hashtag (##
) to highlight the events in question:Suggestion / Solution Perhaps in setting
config.ssh
provide parameterconfig.ssh.log_output
that's configurable toERROR|ALL|NONE
and similarly the same with a setting inconfig.vm
(eg:config.vm.log_output
). Adjusting default (as per current behaviour inVagrant 2.2.19
) should allow for the above highlighted lines to only output in the event of issues rather than all the time with each new provision.Alternatives considered Directing output
2>&1
which will not suffice as erroneous outputs as well as script related events should show. I also haveconfig.vm.box_check_update = false
in my currentVagrantfile
s which help reduce outputs somewhat.