Crates.io | async-rawlogger |
lib.rs | async-rawlogger |
version | 0.1.20241101 |
source | src |
created_at | 2024-10-08 10:36:01.919752 |
updated_at | 2024-11-01 04:17:40.969774 |
description | Light console-only async logger. Suitable for containerized workloads. Heavily inspired by "https://github.com/nonconvextech/ftlog" |
homepage | |
repository | https://github.com/raul-gherman/async-rawlogger |
max_upload_size | |
id | 1401003 |
size | 20,105 |
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}"),
}
}