Struct base::syslog::LogConfig

source ·
pub struct LogConfig<'a, F>where
    F: Fn(&mut Formatter, &Record<'_>) -> Result<()> + Sync + Send + 'static,
{ pub filter: &'a str, pub stderr: bool, pub pipe: Option<Box<dyn Write + Send>>, pub pipe_fd: Option<RawDescriptor>, pub pipe_formatter: Option<F>, pub proc_name: String, pub syslog: bool, pub syslog_facility: Facility, }

Fields§

§filter: &'a str

A filter for log messages. Please see module level documentation and env_logger crate

Example: off, trace, trace,crosvm=error,base::syslog=debug

§stderr: bool

If set to true will duplicate output to stderr

§pipe: Option<Box<dyn Write + Send>>

If specified will output to given Sink

§pipe_fd: Option<RawDescriptor>

descriptor to preserve on forks (intended to be used with pipe)

§pipe_formatter: Option<F>

A formatter to use with the pipe. (Syslog has hardcoded format) see module level documentation and env_logger crate

§proc_name: String

TAG to use for syslog output

§syslog: bool

Enable/disable platform’s “syslog”

§syslog_facility: Facility

Facility to use for syslog output

Trait Implementations§

Returns the “default value” for a type. Read more

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.

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.