pub struct Logger { /* private fields */ }Expand description
Logger implementation that logs to both syslog and console
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn init(
syslog_endpoint: Option<SyslogEndpoint>,
process_name: &str,
allowed_targets: Vec<&'static str>,
)
pub fn init( syslog_endpoint: Option<SyslogEndpoint>, process_name: &str, allowed_targets: Vec<&'static str>, )
Initializes the logger with the given syslog server, process name, and allowed targets
§Arguments
syslog_endpoint- The syslog endpoint to log toprocess_name- The name of the processallowed_targets- The list of allowed targets; if any are specified, only logs from targets starting with one of these entries will be printed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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