log4rs-gelf
log4rs-gelf - A TCP/Gelf appender for log4rs based on
serde_gelf and gelf_logger.
Examples
Configuration via a YAML file:
appenders:
ldp:
additional_fields:
component: rust-cs
buffer_duration: 5
buffer_size: 5
hostname: 127.0.0.1
kind: buffer
level: Informational
null_character: true
port: 12202
use_tls: false
root:
appenders:
- ldp
level: info
init_file.unwrap;
Programmatically constructing a configuration:
use GelfLevel;
use Value;
use ;
use LevelFilter;
OVH Log Data Platform
You can activate the OVH LDP feature including field typing and an preconfigured handler:
[]
= { = "0.1", = ["ovh-ldp"] }
And then build the appender:
let buffer = builder
.put_additional_field
.build
.unwrap;
License
Licensed under BSD 3-Clause License or (https://opensource.org/licenses/BSD-3-Clause)