pub struct SyslogShared<F: SyslogFormatter> { /* private fields */ }Expand description
A common instance which describes the syslog state
Implementations§
pub fn openlog( ident: Option<&str>, logstat: LogStat, facility: LogFacility, net_tap: TapTypeData, ) -> SyRes<SyslogShared<F>>
Trait Implementations§
Source§fn clone(&self) -> SyslogShared<F>
fn clone(&self) -> SyslogShared<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn change_identity(&self, ident: &str) -> SyRes<()>
fn change_identity(&self, ident: &str) -> SyRes<()>
This function can be used to update the facility name, for example after fork().
§Arguments
ident- a new identity (up to 48 UTF8 chars)
fn connectlog(&mut self) -> SyRes<()>
Source§fn setlogmask(&self, logmask: i32) -> SyRes<i32>
fn setlogmask(&self, logmask: i32) -> SyRes<i32>
Sets the logmask to filter out the syslog calls. Read more
Source§fn syslog(&self, pri: Priority, fmt: String)
fn syslog(&self, pri: Priority, fmt: String)
Similar to libc, syslog() sends data to syslog server. Read more
Source§fn vsyslog<S: AsRef<str>>(&self, pri: Priority, fmt: S)
fn vsyslog<S: AsRef<str>>(&self, pri: Priority, fmt: S)
Sends message to syslog (same as
syslog).Source§fn reconnect(&self) -> SyRes<()>
fn reconnect(&self) -> SyRes<()>
Re-opens the connection to the syslog server. Can be used to
rotate logs(handle SIGHUP). Read more
Source§fn update_tap_data(&self, tap_data: TapTypeData) -> SyRes<()>
fn update_tap_data(&self, tap_data: TapTypeData) -> SyRes<()>
Updates the instance’s socket.
tap_data TapTypeData should be of
the same variant (type) as current.Auto Trait Implementations§
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