#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"

16 releases

new 0.3.4 Dec 15, 2024
0.3.3 Dec 13, 2024
0.2.4 Dec 3, 2024
0.2.3 Nov 27, 2024
0.1.20241024 Oct 24, 2024

#423 in Debugging

Download history 319/week @ 2024-10-06 238/week @ 2024-10-13 457/week @ 2024-10-20 136/week @ 2024-10-27 56/week @ 2024-11-03 219/week @ 2024-11-10 211/week @ 2024-11-17 577/week @ 2024-11-24 186/week @ 2024-12-01 318/week @ 2024-12-08

1,329 downloads per month

MIT and AGPL-3.0

15KB
423 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.9–1.4MB
~26K SLoC