Disable ansi coloring in logs. Fixes #3975 (#4101)

This commit is contained in:
Dessalines 2023-10-25 04:58:55 -04:00 committed by GitHub
parent c0aee244e7
commit c38dfdcd64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,9 +352,9 @@ pub fn init_logging(opentelemetry_url: &Option<Url>) -> Result<(), LemmyError> {
let format_layer = { let format_layer = {
#[cfg(feature = "json-log")] #[cfg(feature = "json-log")]
let layer = tracing_subscriber::fmt::layer().json(); let layer = tracing_subscriber::fmt::layer().with_ansi(false).json();
#[cfg(not(feature = "json-log"))] #[cfg(not(feature = "json-log"))]
let layer = tracing_subscriber::fmt::layer(); let layer = tracing_subscriber::fmt::layer().with_ansi(false);
layer.with_filter(targets.clone()) layer.with_filter(targets.clone())
}; };