Skip to content

Commit

Permalink
feat(console): filter out boring frames in backtraces (#365)
Browse files Browse the repository at this point in the history
This commit adds `color_eyre`'s default backtrace frame filters, so we
skip stuff that's not relevant.
  • Loading branch information
hawkw committed Sep 29, 2023
1 parent ec66eda commit 95a5e54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tokio-console/src/view/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ impl Styles {
// terminated by remote hosts.
ErrorKind::NonRecoverable(_) => true,
ErrorKind::Recoverable(_) => false,
});
})
// filter out `color-eyre`'s default set of frames to skip from
// backtraces.
//
// this includes `std::rt`, `color_eyre`'s own frames, and
// `tokio::runtime` & friends.
.add_default_filters();

if self.palette == Palette::NoColors {
// disable colors in error reports
Expand Down

0 comments on commit 95a5e54

Please sign in to comment.