Crates.io | tree-logger |
lib.rs | tree-logger |
version | 0.2.0 |
created_at | 2025-04-12 22:45:48.664032+00 |
updated_at | 2025-07-30 19:47:12.529447+00 |
description | Simple yet feature-full logging and profile tool |
homepage | https://github.com/loremdipso/tree-scraper |
repository | |
max_upload_size | |
id | 1631331 |
size | 61,821 |
Log and profile nested code. Supports multi-threading.
use tree_logger::{TreeLogger, profile};
TreeLogger::new()
.with_colors(true)
.with_threads(true)
.init()
.unwrap();
log::warn!("This is an example message.");
profile!("Some parent span", || {
log::info!("Hello from inside the parent span!");
});
Not much time has been put into making this as performant as it could be (yet!). It's a simple solution that makes a reasonable set of assumptions. If you think you could do better you're probably right :)