pub struct SyslogLocal { /* private fields */ }
Expand description
A local syslog which is working over datagram channel. If no path is specified,
it will try to find the syslog server by the hardcoded links. The same will be
performed if use_alternative
is enabled when path is provided.
Implementations§
Source§impl SyslogLocal
impl SyslogLocal
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a default connection to local syslog server. The correct path will be picked automatically.
Sourcepub fn new_custom_path<P: Into<PathBuf>>(
custom_path: P,
use_alt_path: bool,
) -> SyRes<Self>
pub fn new_custom_path<P: Into<PathBuf>>( custom_path: P, use_alt_path: bool, ) -> SyRes<Self>
Creates a special connection to specific local socket. If use_alt_path
is
set to true and custom_path
is not available, other pre-programmed paths
will be probed and selected the first available.
pub fn get_custom_remote_path(&self) -> Option<&Path>
pub fn get_use_alternative(&self) -> bool
Trait Implementations§
Source§impl AsyncSyslogDestination for SyslogLocal
impl AsyncSyslogDestination for SyslogLocal
Source§type SocketTap = AsyncTap<UnixDatagram, SyslogLocal>
type SocketTap = AsyncTap<UnixDatagram, SyslogLocal>
A provider of the connection to syslog for async code.
Source§impl AsyncSyslogTap<SyslogLocal> for AsyncTap<UnixDatagram, SyslogLocal>
impl AsyncSyslogTap<SyslogLocal> for AsyncTap<UnixDatagram, SyslogLocal>
Source§fn new(req_tap: SyslogLocal) -> SyRes<Self>
fn new(req_tap: SyslogLocal) -> SyRes<Self>
Proves the new instance of the syslog communication. Read more
Source§async fn connectlog(&mut self) -> SyRes<()>
async fn connectlog(&mut self) -> SyRes<()>
Opens a connection to target.
Source§async fn disconnectlog(&mut self) -> Result<()>
async fn disconnectlog(&mut self) -> Result<()>
Disconnects the connection.
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Tells if connection was opened.
Source§fn get_max_msg_size(&self) -> usize
fn get_max_msg_size(&self) -> usize
Returns (in bytes) the maximum message size (including headers).
Source§fn update_tap_data(&mut self, tap_data: SyslogLocal)
fn update_tap_data(&mut self, tap_data: SyslogLocal)
Updates the connection information without breaking tap.
Source§impl Clone for SyslogLocal
impl Clone for SyslogLocal
Source§fn clone(&self) -> SyslogLocal
fn clone(&self) -> SyslogLocal
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyslogLocal
impl Debug for SyslogLocal
Source§impl Display for SyslogLocal
impl Display for SyslogLocal
Source§impl SyslogDestMsg for SyslogLocal
impl SyslogDestMsg for SyslogLocal
Source§fn get_max_msg_len(&self) -> usize
fn get_max_msg_len(&self) -> usize
Should return the max message length for specific syslog server type.
Source§impl SyslogDestination for SyslogLocal
impl SyslogDestination for SyslogLocal
Source§type SocketTap = Tap<UnixDatagram, SyslogLocal>
type SocketTap = Tap<UnixDatagram, SyslogLocal>
A provider of the connection to syslog for sync code.
Auto Trait Implementations§
impl Freeze for SyslogLocal
impl RefUnwindSafe for SyslogLocal
impl Send for SyslogLocal
impl Sync for SyslogLocal
impl Unpin for SyslogLocal
impl UnwindSafe for SyslogLocal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more