Allow passing multiple --log CLI options (#5982)

* Allow passing multiple --log CLI options

* Comment typo
This commit is contained in:
Pierre Krieger
2020-05-12 11:46:06 +02:00
committed by GitHub
parent 70923cdf7c
commit 0690bb51a8
3 changed files with 11 additions and 8 deletions
@@ -42,7 +42,7 @@ pub struct SharedParams {
/// Log levels (least to most verbose) are error, warn, info, debug, and trace.
/// By default, all targets log `info`. The global log level can be set with -l<level>.
#[structopt(short = "l", long = "log", value_name = "LOG_PATTERN")]
pub log: Option<String>,
pub log: Vec<String>,
}
impl SharedParams {
@@ -71,7 +71,7 @@ impl SharedParams {
}
/// Get the filters for the logging
pub fn log_filters(&self) -> Option<String> {
self.log.clone()
pub fn log_filters(&self) -> &[String] {
&self.log
}
}