docs: Add bash-it doctor and logs documentation

pull/1623/head
Noah Gorny 2020-06-20 20:36:12 +03:00
parent 1e674643b3
commit 862c154793
2 changed files with 23 additions and 0 deletions

View File

@ -2,6 +2,15 @@
This page summarizes a couple of rules to keep in mind when developing features or making changes in Bash-it. This page summarizes a couple of rules to keep in mind when developing features or making changes in Bash-it.
## Debugging and Logging
While developing feature or making changes in general, you can log error/warning/debug
using `_log_error` `_log_warning` and `_log_debug`. This will help you solve problems quicker
and also propagate important notes to other users of Bash-it.
You can see the logs by using `bash-it doctor` command to reload and see the logs.
Alternatively, you can set `BASH_IT_LOG_LEVEL` to `BASH_IT_LOG_LEVEL_ERROR`, `BASH_IT_LOG_LEVEL_WARNING` or `BASH_IT_LOG_LEVEL_ALL`.
## Load Order ## Load Order
### General Load Order ### General Load Order

View File

@ -417,6 +417,20 @@ Unset `BASH_IT_LEGACY_PASS` to have Bash-it **return to default behavior**:
* `unset BASH_IT_LEGACY_PASS` * `unset BASH_IT_LEGACY_PASS`
### Debugging
If you encounter problems with any part of Bash-it, run the following command:
```bash
bash-it doctor
```
This will reload your bash profile and print out logs of various parts in Bash-it.
Note that this command at default will print all logs, including debug logs.
You can call it like this:
```bash
bash-it doctor [errors/warnings/all]
```
In order to get wanted verbosity.
### Proxy Support ### Proxy Support
If you are working in a corporate environment where you have to go through a proxy server for internet access, If you are working in a corporate environment where you have to go through a proxy server for internet access,