[−][src]Struct flexi_logger::writers::SyslogWriter
An experimental configurable LogWriter
implementation that writes log messages to the syslog
(see RFC 5424).
Only available with optional crate feature syslog_writer
.
For using the SyslogWriter
, you need to know how the syslog is managed on your system,
how you can access it and with which protocol you can write to it,
so that you can choose a variant of the SyslogConnector
that fits to your environment.
See the module description for guidance how to use additional log writers.
Implementations
impl SyslogWriter
[src]
pub fn try_new(
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
message_id: String,
syslog: SyslogConnector
) -> IoResult<Box<Self>>
[src]
facility: SyslogFacility,
determine_severity: Option<LevelToSyslogSeverity>,
max_log_level: LevelFilter,
message_id: String,
syslog: SyslogConnector
) -> 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 SyslogConnector
.
Errors
std::io::Error
Trait Implementations
impl LogWriter for SyslogWriter
[src]
fn write(&self, now: &mut DeferredNow, record: &Record<'_>) -> IoResult<()>
[src]
fn flush(&self) -> IoResult<()>
[src]
fn max_log_level(&self) -> LevelFilter
[src]
fn format(&mut self, format: FormatFunction)
[src]
fn shutdown(&self)
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,