From c38dfdcd64a9b0082245c8c37fe4014f8ba518a7 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 25 Oct 2023 04:58:55 -0400 Subject: [PATCH] Disable ansi coloring in logs. Fixes #3975 (#4101) --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c12281cdf..64bfa802d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -352,9 +352,9 @@ pub fn init_logging(opentelemetry_url: &Option) -> Result<(), LemmyError> { let format_layer = { #[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"))] - let layer = tracing_subscriber::fmt::layer(); + let layer = tracing_subscriber::fmt::layer().with_ansi(false); layer.with_filter(targets.clone()) };