qoollo-log4rs-logstash

Crates.ioqoollo-log4rs-logstash
lib.rsqoollo-log4rs-logstash
version0.2.0
sourcesrc
created_at2023-01-20 14:39:19.935043
updated_at2023-01-20 14:39:19.935043
descriptionLogstash appender for log4rs
homepagehttps://github.com/qoollo/rust-log4rs-logstash
repositoryhttps://github.com/qoollo/rust-log4rs-logstash
max_upload_size
id763401
size41,878
(idruzhitskiy)

documentation

https://docs.rs/log4rs-logstash

README

Logstash appender for log4rs

Crate Status

This crate provides appender implementation for log4rs.

Previously published under the name log4rs-logstash.

Get started

use std::time::Duration;
use qoollo_log4rs_logstash::config::DeserializersExt; 

fn main() {
    log4rs::init_file(
        "path_to_config.yaml",
        log4rs::config::Deserializers::default().with_logstash(),
    ).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