pub trait LogOptions {
// Required methods
fn target_filter(&self) -> Vec<String>;
fn max_log_level(&self) -> LevelFilter;
// Provided method
fn include_systemd_level(&self) -> bool { ... }
}
Expand description
Additional requirents for CLI options to initialize the logging subsystem
Required Methods§
Sourcefn target_filter(&self) -> Vec<String>
fn target_filter(&self) -> Vec<String>
Only messages with this prefix will be filtered. For instance, if the package name is “foobar”, returning a string “foobar” here will cause only messages from the main package to be emitted.
Sourcefn max_log_level(&self) -> LevelFilter
fn max_log_level(&self) -> LevelFilter
Controls minimum level of messages to be logged.
Messages lower than this level will not be printed.
Provided Methods§
Sourcefn include_systemd_level(&self) -> bool
fn include_systemd_level(&self) -> bool
Print a
Allows systemd to record in system log at appropriate level.
Trait Implementations§
Source§impl<'a> LogOptions for &'a dyn LogOptions
impl<'a> LogOptions for &'a dyn LogOptions
Source§fn include_systemd_level(&self) -> bool
fn include_systemd_level(&self) -> bool
Print a indicating syslog level with each message Read more
Source§fn target_filter(&self) -> Vec<String>
fn target_filter(&self) -> Vec<String>
Only messages with this prefix will be filtered. For instance, if the
package name is “foobar”, returning a string “foobar” here will cause
only messages from the main package to be emitted.
Source§fn max_log_level(&self) -> LevelFilter
fn max_log_level(&self) -> LevelFilter
Controls minimum level of messages to be logged. Read more