mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: add error messaging (#1576)
This creates a custom logger for the log crate which logs everything to a file (/tmp/starship/session_$STARSHIP_SESSION_KEY.log) and it logs everything above Warn to stderr, but only if the log file does not contain the line that should be logged resulting in an error or warning to be only logged at the first starship invocation after opening the shell.
This commit is contained in:
@@ -33,6 +33,21 @@ Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
|
||||
```
|
||||
|
||||
### Logging
|
||||
|
||||
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal.
|
||||
This, however can be changed using the `STARSHIP_CACHE` environment variable:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CACHE=~/.starship/cache
|
||||
```
|
||||
|
||||
Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`:
|
||||
|
||||
```ps1
|
||||
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
```
|
||||
|
||||
### Terminology
|
||||
|
||||
**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
|
||||
|
||||
Reference in New Issue
Block a user