forked from mirrors/kingfisher
Enabled ANSI formatting in the tracing formatter whenever stderr is attached to a terminal so colorized updater messages render correctly instead of showing escape sequences.
This commit is contained in:
parent
d0c948e257
commit
8cf4b4ba95
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
## [Unreleased]
|
||||
- Enabled ANSI formatting in the tracing formatter whenever stderr is attached to a terminal so colorized updater messages render correctly instead of showing escape sequences.
|
||||
|
||||
## [1.51.0]
|
||||
- Added diff-only Git scanning via `--since-commit` and `--branch`, including remote-aware ref resolution so CI jobs can pair `--git-url` clones with pull request branches
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static GLOBAL: System = System;
|
|||
// static GLOBAL: System = System;
|
||||
|
||||
use std::{
|
||||
io::Read,
|
||||
io::{IsTerminal, Read},
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ fn setup_logging(global_args: &GlobalArgs) {
|
|||
let fmt_layer = fmt::layer()
|
||||
.with_writer(std::io::stderr) // Write logs to stderr
|
||||
.with_target(true) // Enable target filtering
|
||||
.with_ansi(false) // Disable colors
|
||||
.with_ansi(std::io::stderr().is_terminal()) // Emit ANSI colours when stderr is a TTY
|
||||
.without_time(); // Remove timestamps
|
||||
// Build and initialize the registry
|
||||
registry()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue