async-rawlogger

Crates.ioasync-rawlogger
lib.rsasync-rawlogger
version0.1.20241101
sourcesrc
created_at2024-10-08 10:36:01.919752
updated_at2024-11-01 04:17:40.969774
descriptionLight console-only async logger. Suitable for containerized workloads. Heavily inspired by "https://github.com/nonconvextech/ftlog"
homepage
repositoryhttps://github.com/raul-gherman/async-rawlogger
max_upload_size
id1401003
size20,105
Raul Gherman (raul-gherman)

documentation

README

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}"),
    }
}
Commit count: 0

cargo fmt