pub struct Syslog { /* private fields */ }Expand description
Logger object to make log output message to syslog.
Creating and initializing a logger object will make log’s logging
macros go to syslog. By default a logger object gets created with facility
Facility::User, the name of the process as its ident, a global log
level of LevelFilter::Info, no module loglevels and with logopt set to
libsyslog_sys::LOG_PID. The SyslogBuilder can be used to customize
those default values.
Implementations§
Source§impl Syslog
impl Syslog
Sourcepub fn builder() -> SyslogBuilder
pub fn builder() -> SyslogBuilder
Returns the SyslogBuilder used to create a Syslog logger object.
Sourcepub fn init(self) -> Result<(), SetLoggerError>
pub fn init(self) -> Result<(), SetLoggerError>
Initialize logging by opening a connection to syslog and hand over self to be
log’s global logger.
Passes the result of set_boxed_logger, where
SetLoggerError is returned if a global logger already is active.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Syslog
impl RefUnwindSafe for Syslog
impl Send for Syslog
impl Sync for Syslog
impl Unpin for Syslog
impl UnwindSafe for Syslog
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