fix: replacing default RUST_LOG environement variable with starship specific one, to prevent interlacing (#1280)
Co-authored-by: Kappitou Anouar <anourkappitou@gmail.com>
This commit is contained in:
parent
055986e2b1
commit
feac3d56ce
|
@ -27,15 +27,15 @@ Any styling that is applied to a module is inherited by its segments. Module pre
|
||||||
## Logging
|
## 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 [pretty_env_logger](https://crates.io/crates/pretty_env_logger).
|
||||||
To run starship with debug logs, set the `RUST_LOG` environment variable to the log level needed.
|
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:
|
For example, to enable the trace logs, run the following:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Run installed starship
|
# Run installed starship
|
||||||
RUST_LOG=starship=trace starship
|
STARSHIP_LOG=starship=trace starship
|
||||||
|
|
||||||
# Run with cargo
|
# Run with cargo
|
||||||
RUST_LOG=starship=trace cargo run
|
STARSHIP_LOG=starship=trace cargo run
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linting
|
## Linting
|
||||||
|
|
|
@ -23,7 +23,7 @@ use crate::module::ALL_MODULES;
|
||||||
use clap::{App, AppSettings, Arg, Shell, SubCommand};
|
use clap::{App, AppSettings, Arg, Shell, SubCommand};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
pretty_env_logger::init();
|
pretty_env_logger::init_custom_env("STARSHIP_LOG");
|
||||||
|
|
||||||
let status_code_arg = Arg::with_name("status_code")
|
let status_code_arg = Arg::with_name("status_code")
|
||||||
.short("s")
|
.short("s")
|
||||||
|
|
Loading…
Reference in New Issue