Struct flexi_logger::writers::SyslogWriter
source · [−]pub struct SyslogWriter { /* private fields */ }
Expand description
Implementations
sourceimpl SyslogWriter
impl SyslogWriter
sourcepub fn try_new(
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
message_id: String,
syslog: Syslog
) -> IoResult<Box<Self>>
pub fn try_new(
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
message_id: String,
syslog: Syslog
) -> IoResult<Box<Self>>
Returns a configured boxed instance.
Parameters
facility
: An value representing a valid syslog facility value according to RFC 5424.
determine_severity
: (optional) A function that maps the rust log levels
to the syslog severities. If None is given, a trivial default mapping is used, which
should be good enough in most cases.
message_id
: The value being used as syslog’s MSGID, which
should identify the type of message. The value itself
is a string without further semantics. It is intended for filtering
messages on a relay or collector.
syslog
: A Syslog
.
Errors
std::io::Error
sourcepub fn try_new_bsd(
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
syslog: Syslog
) -> IoResult<Box<Self>>
pub fn try_new_bsd(
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
syslog: Syslog
) -> IoResult<Box<Self>>
Returns a configured boxed instance.
Parameters
facility
: An value representing a valid syslog facility value according to RFC 5424.
determine_severity
: (optional) A function that maps the rust log levels
to the syslog severities. If None is given, a trivial default mapping is used, which
should be good enough in most cases.
message_id
: The value being used as syslog’s MSGID, which
should identify the type of message. The value itself
is a string without further semantics. It is intended for filtering
messages on a relay or collector.
syslog
: A Syslog
.
Errors
std::io::Error
Trait Implementations
sourceimpl LogWriter for SyslogWriter
impl LogWriter for SyslogWriter
sourcefn write(&self, now: &mut DeferredNow, record: &Record<'_>) -> IoResult<()>
fn write(&self, now: &mut DeferredNow, record: &Record<'_>) -> IoResult<()>
Writes out a log line. Read more
sourcefn max_log_level(&self) -> LevelFilter
fn max_log_level(&self) -> LevelFilter
Provides the maximum log level that is to be written.
sourcefn format(&mut self, format: FormatFunction)
fn format(&mut self, format: FormatFunction)
Sets the format function. Read more
Auto Trait Implementations
impl RefUnwindSafe for SyslogWriter
impl Send for SyslogWriter
impl Sync for SyslogWriter
impl Unpin for SyslogWriter
impl UnwindSafe for SyslogWriter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more