From 2f424ca9f9f30547f1b93dc6279a0e6372b0c605 Mon Sep 17 00:00:00 2001 From: Lucas Colombo Date: Mon, 27 May 2024 06:30:55 -0300 Subject: [PATCH] =?UTF-8?q?fix(logger):=20=F0=9F=9A=91=20extra=20":"=20whe?= =?UTF-8?q?n=20external=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/logger/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/logger/mod.rs b/lib/logger/mod.rs index d6180b2..fee5fa4 100644 --- a/lib/logger/mod.rs +++ b/lib/logger/mod.rs @@ -155,12 +155,14 @@ impl Log for ConsoleLogger { format!(" {} ", styled_record.time) }; - let (ctx, ctx_separator) = if self.name.is_empty() { - ("".to_string(), "".to_string()) + let ctx = if self.name.is_empty() { + "".to_string() } else { - (format!("{} »", self.name), ":".to_string()) + format!("{} »", self.name) }; + let ctx_separator = if styled_record.line.is_empty() { "" } else { ":" }; + // print to stdout println!( "{}{}| {} | {}{}{} - {}",