Add `--debug` option as a shortcut for `VAGRANT_LOG=debug`
When asking or submitting debug information, a command line switch is easier and faster than using an environment variable.
This commit is contained in:
parent
a92e03cf4c
commit
28740943bb
|
@ -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'
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue