Crates.io | qoollo-log4rs-logstash |
lib.rs | qoollo-log4rs-logstash |
version | 0.2.0 |
source | src |
created_at | 2023-01-20 14:39:19.935043 |
updated_at | 2023-01-20 14:39:19.935043 |
description | Logstash appender for log4rs |
homepage | https://github.com/qoollo/rust-log4rs-logstash |
repository | https://github.com/qoollo/rust-log4rs-logstash |
max_upload_size | |
id | 763401 |
size | 41,878 |
This crate provides appender implementation for log4rs.
Previously published under the name log4rs-logstash
.
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.