We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76bb05f commit 2d0383aCopy full SHA for 2d0383a
crates/common/tedge_config/src/system_services/log_config.rs
@@ -2,6 +2,7 @@ use camino::Utf8Path;
2
3
use crate::system_services::SystemConfig;
4
use crate::system_services::SystemServiceError;
5
+use std::io::IsTerminal;
6
use std::str::FromStr;
7
8
pub fn get_log_level(
@@ -27,6 +28,7 @@ pub fn get_log_level(
27
28
pub fn set_log_level(log_level: tracing::Level) {
29
let subscriber = tracing_subscriber::fmt()
30
.with_writer(std::io::stderr)
31
+ .with_ansi(std::io::stderr().is_terminal())
32
.with_timer(tracing_subscriber::fmt::time::UtcTime::rfc_3339());
33
34
if std::env::var("RUST_LOG").is_ok() {
0 commit comments