Trait LogOptions

Source
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§

Source

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

Controls minimum level of messages to be logged.

Messages lower than this level will not be printed.

Provided Methods§

Source

fn include_systemd_level(&self) -> bool

Print a indicating syslog level with each message

Allows systemd to record in system log at appropriate level.

Trait Implementations§

Source§

impl<'a> LogOptions for &'a dyn LogOptions

Source§

fn include_systemd_level(&self) -> bool

Print a indicating syslog level with each message Read more
Source§

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

Controls minimum level of messages to be logged. Read more

Implementors§

Source§

impl<'a> LogOptions for &'a dyn LogOptions