fix: disable ANSI colours for the tracing_subscriber so that the logs are not polluted with escape codes (#832)

This commit is contained in:
Rolv Apneseth 2024-03-22 03:40:22 +00:00 committed by GitHub
parent 9918ceb7f4
commit e5c543cf80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,8 @@ impl Logs {
let (handle, guard) = tracing_appender::non_blocking(appender);
// let filter = EnvFilter::from_default_env();
let subscriber = Registry::default().with(fmt::layer().pretty().with_writer(handle));
let subscriber =
Registry::default().with(fmt::layer().pretty().with_writer(handle).with_ansi(false));
tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");