Struct flexi_logger::writers::SyslogWriter
source · pub struct SyslogWriter { /* private fields */ }
syslog_writer
only.Expand description
Implementations§
source§impl 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