[][src]Struct log4rs_syslog_net::SyslogAppenderBuilder

pub struct SyslogAppenderBuilder { /* fields omitted */ }

Builder for SyslogAppender.

Implementations

impl SyslogAppenderBuilder[src]

pub fn new() -> SyslogAppenderBuilder[src]

Creates a SyslogAppenderBuilder for constructing new SyslogAppender.

pub fn protocol(self, p: SyslogAppenderProtocol) -> Self[src]

Sets network protocol for accessing syslog.

Defaults to "udp".

pub fn address(self, addrs: String) -> Self[src]

Sets network address of syslog server.

Defaults to "localhost:514".

pub fn format(self, mf: MessageFormat) -> Self[src]

Sets type of log message formatter.

Defaults to Plain.

pub fn max_len(self, ml: usize) -> Self[src]

Sets the maximum length of a message in bytes. If a log message exceedes this size, it's truncated with not respect to UTF char boundaries.

Defaults to 2048.

pub fn encoder(self, encoder: Box<dyn Encode>) -> Self[src]

Sets the encoder used to encode the message

pub fn build(self) -> Result<SyslogAppender>[src]

Produces a SyslogAppender with parameters, supplied to the builder.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.