Skip to content

Commit

Permalink
Display log level
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Sep 12, 2023
1 parent b60b684 commit 1882c91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions espflash/src/cli/monitor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ fn handle_defmt(ctx: &mut SerialContext, frame: Frame<'_>, out: &mut dyn Write)
defmt_parser::Level::Warn => Color::Yellow,
defmt_parser::Level::Error => Color::Red,
};
out.queue(PrintStyledContent(message.as_str().with(color)))
.ok()
out.queue(PrintStyledContent(
format!("[{}] - {}", level.as_str().to_uppercase(), message.as_str()).with(color),
))
.ok()
}
None => out.queue(Print(message.as_str())).ok(),
};
Expand Down

0 comments on commit 1882c91

Please sign in to comment.