tracing-fancytree

Crates.iotracing-fancytree
lib.rstracing-fancytree
version0.1.0
created_at2025-01-20 00:20:43.719126+00
updated_at2025-01-20 00:20:43.719126+00
descriptiontracing subscriber with readable tree output
homepage
repositoryhttps://codeberg.org/0x57e11a/tracing-fancytree
max_upload_size
id1523358
size611,312
stella (0x57e11a)

documentation

README

tracing-fancytree

a tracing-subscriber layer that prints very pretty and understandable trees, with symbols and colors

screenshot

usage

add the tracing, tracing-subscriber, and tracing-fancytree crates to Cargo.toml

fn main() {
	{
		use {
			::std::io::IsTerminal,
			::tracing_subscriber::layer::{Layer, SubscriberExt},
		};

		let out = ::std::io::stdout();
		let use_ansi = out.is_terminal();
		let use_symbols = out.is_terminal();

		::tracing::subscriber::set_global_default(
			::tracing_subscriber::registry().with(
				::tracing_fancytree::FancyTree::new(out, use_ansi, use_symbols),
			),
		)
		.unwrap();
	}

	// ...
}
Commit count: 0

cargo fmt