fix(logger): 🚑 extra ":" when external log

This commit is contained in:
Lucas Colombo 2024-05-27 06:30:55 -03:00
parent a5e5d9e987
commit 2f424ca9f9
Signed by: lucas
GPG Key ID: EF34786CFEFFAE35

View File

@ -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!(
"{}{}| {} | {}{}{} - {}",