Crates.io | log4rs-logstash |
lib.rs | log4rs-logstash |
version | 0.1.0 |
source | src |
created_at | 2022-05-15 16:14:52.774465 |
updated_at | 2022-05-15 16:14:52.774465 |
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 | 587224 |
size | 33,757 |
This crate provides appender implementation for log4rs.
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.