[][src]Enum flexi_logger::writers::SyslogConnector

pub enum SyslogConnector {
    Udp(UdpSocket),
    Tcp(BufWriter<TcpStream>),
}

Helper struct that connects to the syslog and implements Write.

Is used in SyslogWriter::try_new.

Example

    use flexi_logger::writers::SyslogConnector;
   let syslog_connector = SyslogConnector::try_tcp("localhost:7777").unwrap();

Variants

Sends log lines to the syslog via UDP.

UDP is fragile and thus discouraged except for local communication.

Sends log lines to the syslog via TCP.

Implementations

impl SyslogConnector[src]

pub fn try_tcp<T: ToSocketAddrs>(server: T) -> IoResult<Self>[src]

Returns a SyslogConnector which sends the log lines via TCP to the specified address.

Errors

std::io::Error if opening the stream fails.

pub fn try_udp<T: ToSocketAddrs>(local: T, server: T) -> IoResult<Self>[src]

Returns a SyslogConnector which sends log via the fragile UDP protocol from local to server.

Errors

std::io::Error if opening the stream fails.

Trait Implementations

impl Debug for SyslogConnector[src]

impl Write for SyslogConnector[src]

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.