pub struct SyslogWriter { /* private fields */ }
Expand description

A configurable LogWriter implementation that writes log messages to the syslog (see RFC 5424).

Only available with optional crate feature syslog_writer.

See the writers module for guidance how to use additional log writers.

Implementations

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

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

Writes out a log line. Read more

Flushes any buffered records. Read more

Provides the maximum log level that is to be written.

Sets the format function. Read more

Cleanup open resources, if necessary.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more