Skip to content
Colorful panic backtraces for Rust
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Slight rework of `Settings` interface Apr 23, 2019
src
.gitignore Rename verbosity contants to match Rust guidelines Apr 28, 2019
Cargo.toml Only colorize output when printing to a tty May 7, 2019
LICENSE-APACHE Relicense to dual MIT/Apache-2.0 Apr 24, 2019
LICENSE-MIT
README.md Slight rework of `Settings` interface Apr 23, 2019
azure-pipelines.yml Add Windows and macOS CI May 7, 2019

README.md

color-backtrace

Crates.io docs.rs MIT licensed

A Rust library that makes panics a little less painful by nicely colorizing them and printing the relevant source snippets.

[dependencies]
color-backtrace = { version = "0.1" }

To enable it, simply place this code somewhere in your app initialization code:

color_backtrace::install();

If you want to customize some settings, you can instead do:

use color_backtrace::{install_with_settings, Settings};
install_with_settings(Settings::new().message("Custom message!"));

Features

  • Colorize backtraces to be easier on the eyes
  • Show source snippets if source files are found on disk
  • Print frames of application code vs dependencies in different color
  • Hide all the frames after the panic was already initiated

Screenshot

Screenshot

You can’t perform that action at this time.