Don't log with colors when we are writing to a tty (#7525)

* Don't log with colors when we are writing to a tty

This fixes a regression that was introduced by the switch to tracing.
Before we killed all colors before writing to a tty, this pr brings the
behaviour back.

* Remove accidentally added crate

* Review feedback

* More feedback

* Update client/cli/src/logging.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/cli/src/logging.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2020-11-12 20:01:58 +01:00
committed by GitHub
parent cbe9bbd2d8
commit 07abf7d3af
5 changed files with 102 additions and 19 deletions
+3 -1
View File
@@ -35,7 +35,9 @@ mod display;
/// The format to print telemetry output in.
#[derive(Clone, Debug)]
pub struct OutputFormat {
/// Enable color output in logs. True by default.
/// Enable color output in logs.
///
/// Is enabled by default.
pub enable_color: bool,
}