Skip to content

Commit feac3d5

Browse files
anouarkappitouKappitou Anouar
and
Kappitou Anouar
authored
fix: replacing default RUST_LOG environement variable with starship specific one, to prevent interlacing (starship#1280)
Co-authored-by: Kappitou Anouar <[email protected]>
1 parent 055986e commit feac3d5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ Any styling that is applied to a module is inherited by its segments. Module pre
2727
## Logging
2828

2929
Debug logging in starship is done with [pretty_env_logger](https://crates.io/crates/pretty_env_logger).
30-
To run starship with debug logs, set the `RUST_LOG` environment variable to the log level needed.
30+
To run starship with debug logs, set the `STARSHIP_LOG` environment variable to the log level needed.
3131
For example, to enable the trace logs, run the following:
3232

3333
```sh
3434
# Run installed starship
35-
RUST_LOG=starship=trace starship
35+
STARSHIP_LOG=starship=trace starship
3636

3737
# Run with cargo
38-
RUST_LOG=starship=trace cargo run
38+
STARSHIP_LOG=starship=trace cargo run
3939
```
4040

4141
## Linting
@@ -118,4 +118,4 @@ This is our preferred process for opening a PR on GitHub:
118118
4. When your changes are ready for review, push your branch: `git push origin my-feature-branch`
119119
5. Create a pull request from your branch to `starship/master`
120120
6. No need to assign the pull request to anyone, we'll review it when we can
121-
7. When the changes have been reviewed and approved, someone will squash and merge for you
121+
7. When the changes have been reviewed and approved, someone will squash and merge for you

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::module::ALL_MODULES;
2323
use clap::{App, AppSettings, Arg, Shell, SubCommand};
2424

2525
fn main() {
26-
pretty_env_logger::init();
26+
pretty_env_logger::init_custom_env("STARSHIP_LOG");
2727

2828
let status_code_arg = Arg::with_name("status_code")
2929
.short("s")

0 commit comments

Comments
 (0)