Use DFT_LOG as the internal logging environment variable

Fixes #519
pull/522/head
Wilfred Hughes 2023-05-21 23:33:34 +07:00
parent 0c65731026
commit b0a3a0ada9
4 changed files with 10 additions and 3 deletions

@ -1,5 +1,11 @@
## 0.48 (unreleased)
### Internals
Difftastic's logging is now configured with the environment variable
`DFT_LOG`. This was previously `RUST_LOG`, which could interfere with
users configuring logging for their own development work.
## 0.47 (released 16th May 2023)
### Language Detection

@ -73,7 +73,7 @@ Difftastic uses the `pretty_env_logger` library to log some additional
debug information.
```
$ RUST_LOG=debug cargo run sample_files/old.jsx sample_files/new.jsx
$ DFT_LOG=debug cargo run sample_files/old.jsx sample_files/new.jsx
```
See the [`env_logger`

@ -94,7 +94,8 @@ fn reset_sigpipe() {
/// The entrypoint.
fn main() {
pretty_env_logger::init_timed();
pretty_env_logger::try_init_timed_custom_env("DFT_LOG")
.expect("The logger has not been previously initalized");
reset_sigpipe();
match options::parse_args() {

@ -62,7 +62,7 @@ $ GIT_EXTERNAL_DIFF=./target/release/difft git log -p --ext-diff -- src
Difftastic使用`pretty_env_logger`库来记录一些额外的调试信息。
```
$ RUST_LOG=debug cargo run sample_files/old.jsx sample_files/new.jsx
$ DFT_LOG=debug cargo run sample_files/old.jsx sample_files/new.jsx
```
请参阅[`env_logger`](https://docs.rs/env_logger/0.9.0/env_logger/)以获得完整的细节。