[][src]Trait structopt_flags::LogLevel

pub trait LogLevel {
    fn get_level_filter(&self) -> LevelFilter;

    fn get_log_level(&self) -> Option<Level> { ... }
fn set_log_level(&self) { ... } }

This trait is designed to provide a log level filter, compatible with the Log crates, derived from an option or a flag. Options that can induce a log level, can implement this trait

If the simplelog features is configured, the set_log_level() function will provide an easy way to set the log level to the TermLogger

Required methods

fn get_level_filter(&self) -> LevelFilter

Return the level filter.

The log level could be None if the log has been switched off

Loading content...

Provided methods

fn get_log_level(&self) -> Option<Level>

Return the log level.

The log level could be None if the log has been switched off

fn set_log_level(&self)

This function will set the log level provided by the option/flag if the feature simplelog is enabled

Loading content...

Implementors

Loading content...