Struct gelf::UdpBackend
[−]
[src]
pub struct UdpBackend { /* fields omitted */ }
UdpBackend is the default and standard GELF backend
It pushes messages to a GELF host via UDP. Messages are cut into chunks of a certain chunk-size. This size is important since the chunk-size + a stable overhead of 12 bytes needs to fit the transport layer's mtu.
If the message fits into a single chunk, no chunking is applied.
Methods
impl UdpBackend
[src]
fn new<T: ToSocketAddrs>(destination: T) -> Result<UdpBackend>
Construct a new UdpBackend with default chunk-size (ChunkSize::LAN)
fn new_with_chunksize<T: ToSocketAddrs>(
destination: T,
chunk_size: ChunkSize
) -> Result<UdpBackend>
destination: T,
chunk_size: ChunkSize
) -> Result<UdpBackend>
Construct an new UdpBackend with the given chunk-size
fn compression(&self) -> MessageCompression
Return the current set compression algorithm
fn set_compression(&mut self, compression: MessageCompression) -> &mut Self
Set the compression algorithm
Trait Implementations
impl Backend for UdpBackend
[src]
fn log_message(&self, msg: WireMessage) -> Result<()>
Log a message via UDP.