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:
Tilmann Meyer
2020-09-28 22:38:50 +02:00
committed by GitHub
parent 3c668e6e6a
commit 2233683410
26 changed files with 188 additions and 97 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
## Logging
Debug logging in starship is done with [pretty_env_logger](https://crates.io/crates/pretty_env_logger).
Debug logging in starship is done with our custom logger implementation.
To run starship with debug logs, set the `STARSHIP_LOG` environment variable to the log level needed.
For example, to enable the trace logs, run the following: