diff --git a/bin/vagrant b/bin/vagrant index fa51feb6a..de1e8b697 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -5,6 +5,13 @@ # initializing which have historically resulted in stack traces. Signal.trap("INT") { exit 1 } +# Set logging level to `debug`. This is done before loading 'vagrant', as it +# sets up the logging system. +if ARGV.include?("--debug") + ARGV.delete("--debug") + ENV["VAGRANT_LOG"] = "debug" +end + require 'log4r' require 'vagrant' require 'vagrant/cli' diff --git a/website/docs/source/v2/debugging.html.md b/website/docs/source/v2/debugging.html.md index 0821c815d..5fdc81774 100644 --- a/website/docs/source/v2/debugging.html.md +++ b/website/docs/source/v2/debugging.html.md @@ -37,6 +37,14 @@ $ vagrant up ... ``` +You can also get the debug level output using the `--debug` command line +option. For example: + +``` +$ vagrant up --debug +... +``` + If you plan on submitting a bug report, please submit debug-level logs along with the report using [gist](https://gist.github.com/) or some other paste service.