Struct Syslog

Source
pub struct Syslog { /* private fields */ }
Expand description

A rust interface for Syslog, a standard unix system logging service

Implementations§

Source§

impl Syslog

Source

pub fn udp(host: SocketAddr) -> Syslog

Factory for a Syslog appender that writes to remote Syslog daemon listening a SocketAddr

Source

pub fn localudp() -> Syslog

Same as udp with providing local loopback address with the standard syslog port

Source

pub fn unix<P: AsRef<Path>>(path: P) -> Syslog

Factory for a Syslog appender that writes to a host-local Syslog daemon listening on a unix socket domain hosted at the given Path

Source

pub fn facility(self, facility: Facility) -> Syslog

Returns a new Syslog appender configured to append with the provided Facility

Source

pub fn host(self, local: &str) -> Syslog

Returns a new Syslog appender configured to append with the provided host addr

Source

pub fn app(self, app: &str) -> Syslog

Returns a new Syslog appender, configured to append with the provided app-name

Source

pub fn pid(self, pid: &str) -> Syslog

Returns a new Syslog appender configured to append with the provided p(rocess)id

Source

pub fn msgid(self, id: &str) -> Syslog

Returns a new Syslog appender configured to append with the provided msgid

Source

pub fn debug(&mut self, msg: &str) -> Result

Emits a debug level message

Source

pub fn info(&mut self, msg: &str) -> Result

Emits an info level message

Source

pub fn notice(&mut self, msg: &str) -> Result

Emits an info level message

Source

pub fn warn(&mut self, msg: &str) -> Result

Emits an warn level message

Source

pub fn err(&mut self, msg: &str) -> Result

Emits an error level message

Source

pub fn critical(&mut self, msg: &str) -> Result

Emits a critical level message

Source

pub fn alert(&mut self, msg: &str) -> Result

Emits an alert level message

Source

pub fn emergency(&mut self, msg: &str) -> Result

Emits a emergencycritical level message

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.