#datadog #logger #send #flexi-logger #tokio #error #compatible

flexi_logger_datadog

A flexi_logger compatible logger that sends to DataDog

4 releases

0.1.3 Apr 26, 2022
0.1.2 Apr 26, 2022
0.1.1 Feb 14, 2022
0.1.0 Feb 4, 2022

#33 in #datadog

MIT license

27KB
579 lines

flexi-logger-datadog

Crates.io docs.rs GitHub Workflow Status

Logger for https://github.com/emabee/flexi_logger that writes to DataDog.

Usage

Using tokio

#[tokio::main]
async fn main() {
    let dd_config = DataDogConfigBuilder::new(
        "logging-service-hostname".to_string(),
        "logging-service".to_string(),
        "DUMMY_API_KEY".to_string(),
    )
    .build();
    
    init_tokio_logger(dd_config, None).await.unwrap();
    
    trace!("Trace message");
    debug!("Debug message");
    info!("Info message");
    error!("Error message");
}

lib.rs:

DataDog output for flexi_logger

Dependencies

~7–19MB
~276K SLoC