Skip to content

Commit 290f99a

Browse files
committed
Display log level
1 parent 576ebd0 commit 290f99a

File tree

1 file changed

+4
-2
lines changed
  • espflash/src/cli/monitor

1 file changed

+4
-2
lines changed

espflash/src/cli/monitor/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,10 @@ fn handle_defmt(ctx: &mut SerialContext, frame: Frame<'_>, out: &mut dyn Write)
282282
defmt_parser::Level::Warn => Color::Yellow,
283283
defmt_parser::Level::Error => Color::Red,
284284
};
285-
out.queue(PrintStyledContent(message.as_str().with(color)))
286-
.ok()
285+
out.queue(PrintStyledContent(
286+
format!("[{}] - {}", level.as_str().to_uppercase(), message.as_str()).with(color),
287+
))
288+
.ok()
287289
}
288290
None => out.queue(Print(message.as_str())).ok(),
289291
};

0 commit comments

Comments
 (0)