Struct clap_flags::Log [−][src]
pub struct Log { /* fields omitted */ }
Add log functionality to Structopt.
Methods
impl Log
[src]
impl Log
pub fn log(&self, level: Option<Level>, own_pkg_name: &str) -> Result<(), Error>
[src]
pub fn log(&self, level: Option<Level>, own_pkg_name: &str) -> Result<(), Error>
Initialize env_logger
and set the log level for the given package.
All other modules default to printing warnings.
pub fn log_all(&self, level: Option<Level>) -> Result<(), Error>
[src]
pub fn log_all(&self, level: Option<Level>) -> Result<(), Error>
Initialize env_logger
and set the log level for all packages. No
additional filtering is applied.
Trait Implementations
impl StructOpt for Log
[src]
impl StructOpt for Log
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn clap<'a, 'b>() -> App<'a, 'b>
Returns the corresponding clap::App
.
fn from_clap(matches: &ArgMatches) -> Log
[src]
fn from_clap(matches: &ArgMatches) -> Log
Creates the struct from clap::ArgMatches
. It cannot fail with a parameter generated by clap
by construction. Read more
fn from_args() -> Self
[src]
fn from_args() -> Self
Gets the struct from the command line arguments. Print the error message and quit the program in case of failure. Read more
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Print the error message and quit the program in case of failure. Read more
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
impl Debug for Log
[src]
impl Debug for Log