1 unstable release

0.1.0 May 15, 2022

#697 in Debugging

MIT license

30KB
712 lines

Logstash appender for log4rs

This crate provides appender implementation for log4rs.

Get started

use std::time::Duration;

fn main() {
    log4rs::init_file(
        "path_to_config.yaml",
        log4rs_logstash::config::deserializers(),
    ).unwrap();
    spawn_signal_handler().unwrap();

    log::debug!("Debug");
    log::trace!("Trace");
    log::info!("Info");
    log::warn!("Warn");
    log::error!("Error");
}

examples/basic.rs provides example of program with exit handling.

examples/basic_config.yaml example of config file with logstash appender.

Dependencies

~2–15MB
~210K SLoC