log4rs-logstash

Crates.iolog4rs-logstash
lib.rslog4rs-logstash
version0.1.0
sourcesrc
created_at2022-05-15 16:14:52.774465
updated_at2022-05-15 16:14:52.774465
descriptionLogstash appender for log4rs
homepagehttps://github.com/qoollo/rust-log4rs-logstash
repositoryhttps://github.com/qoollo/rust-log4rs-logstash
max_upload_size
id587224
size33,757
Vladimir Stepanenko (vovac12)

documentation

https://docs.rs/log4rs-logstash

README

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.

Commit count: 41

cargo fmt