Skip to content

Commit b43dd31

Browse files
committed
Display log level
1 parent 9162ef6 commit b43dd31

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
@@ -247,8 +247,10 @@ fn handle_defmt(ctx: &mut SerialContext, frame: Frame<'_>, out: &mut dyn Write)
247247
defmt_parser::Level::Warn => Color::Yellow,
248248
defmt_parser::Level::Error => Color::Red,
249249
};
250-
out.queue(PrintStyledContent(message.as_str().with(color)))
251-
.ok()
250+
out.queue(PrintStyledContent(
251+
format!("[{}] - {}", level.as_str().to_uppercase(), message.as_str()).with(color),
252+
))
253+
.ok()
252254
}
253255
None => out.queue(Print(message.as_str())).ok(),
254256
};

0 commit comments

Comments
 (0)