#async #logger #workload #containerized #github #light #heavily

async-rawlogger

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

19 releases (4 breaking)

0.5.0 Jan 14, 2025
0.4.1 Jan 12, 2025
0.4.0 Dec 15, 2024
0.3.4 Dec 15, 2024
0.1.20241024 Oct 24, 2024

#513 in Debugging

Download history 89/week @ 2024-10-02 280/week @ 2024-10-09 401/week @ 2024-10-16 263/week @ 2024-10-23 149/week @ 2024-10-30 35/week @ 2024-11-06 246/week @ 2024-11-13 314/week @ 2024-11-20 553/week @ 2024-11-27 79/week @ 2024-12-04 624/week @ 2024-12-11 42/week @ 2024-12-18 210/week @ 2025-01-08 93/week @ 2025-01-15

303 downloads per month

MIT and AGPL-3.0

11KB
274 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
~26K SLoC