21 releases (4 breaking)
Uses new Rust 2024
new 0.5.2 | Mar 15, 2025 |
---|---|
0.5.0 | Jan 14, 2025 |
0.4.0 | Dec 15, 2024 |
0.2.3 | Nov 27, 2024 |
#599 in Debugging
353 downloads per month
13KB
278 lines
use async_logger::{error, info, LevelFilter};
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
initialize_logging().await;
info!("starting...");
Ok(())
}
async fn initialize_logging() {
match async_logger::builder()
.max_log_level(LevelFilter::Info)
.bounded(100_000, false)
.try_init()
{
Ok(_) => {}
Err(e) => error!("{e}"),
}
}
Dependencies
~0.8–1.3MB
~25K SLoC