| Crates.io | tree-logger |
| lib.rs | tree-logger |
| version | 0.2.1 |
| created_at | 2025-04-12 22:45:48.664032+00 |
| updated_at | 2025-09-22 19:44:13.828114+00 |
| description | Simple yet feature-full logging and profile tool |
| homepage | |
| repository | https://github.com/loremdipso/tree-logger |
| max_upload_size | |
| id | 1631331 |
| size | 61,823 |
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 :)