[−][src]Enum flexi_logger::writers::SyslogConnector
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
Udp(UdpSocket)
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]
fn write(&mut self, message: &[u8]) -> IoResult<usize>
[src]
fn flush(&mut self) -> IoResult<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
fn is_write_vectored(&self) -> bool
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for SyslogConnector
impl Send for SyslogConnector
impl Sync for SyslogConnector
impl Unpin for SyslogConnector
impl UnwindSafe for SyslogConnector
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,