diff --git a/Global-Options.md b/Global-Options.md new file mode 100644 index 0000000..96e1678 --- /dev/null +++ b/Global-Options.md @@ -0,0 +1,24 @@ +These options apply to all commands but must be placed before the command: +``` + -verbose, -v show more detailed information + -debug, -d show even more detailed information, useful for debugging + -log enable log-style output + -stack print the stack trace when an error occurs + -no-script do not run script before or after command execution + -background read passwords, tokens, or keys only from keychain/keyring or env + -profile enable the profiling tool and listen on the specified address:port + -help, -h show help + +``` + +The `-verbose` option will show TRACE level messages, while the `-debug` option enables DEBUG level messages. By default, only INFO, WARNING, and ERROR messages are displayed. + +The `-log` option will show the timestamp, level, and the message id of each log message. + +The `-stack` option is used to dump the stack trace when an error occurs to help locate where the error is. + +The `no-script` option will stop [[Pre Command and Post Command Scripts]] from running. This is usually used to avoid an infinite loop of command execution. + +The `-background` option will instruct Duplicacy not to ask for interactive password input. As a result, Duplicacy will read all credentials only from keychain/keyring or the environment variables. If a credential can't be found, an error will be reported. + +With the `-profile` option, you can open `http://address:port/debug/pprof/` in a browser to profile a running Duplicacy instance. Please refer to https://golang.org/pkg/net/http/pprof/ for instructions.