#logging #async-logging #github #light #containerized #ftlog

async-rawlogger

Light console-only async logger. Suitable for containerized workloads. Heavily inspired by "https://github.com/nonconvextech/ftlog"

24 releases (5 breaking)

Uses new Rust 2024

0.6.20250512 May 12, 2025
0.5.4 Apr 5, 2025
0.5.3 Mar 24, 2025
0.4.0 Dec 15, 2024
0.2.3 Nov 27, 2024

#669 in Debugging

Download history

2,033 downloads per month

MIT and AGPL-3.0

12KB
292 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.7–1.2MB
~23K SLoC