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