Add CLI argument to disable log color output (#7795)

This commit is contained in:
Bastian Köcher authored and GitHub committed 2020-12-29 23:08:58 +00:00
1 parent acf9d2145d
commit 256871f553
4 files changed
+71 -27

No files matched your search

@@ -46,6 +46,10 @@ pub struct SharedParams {
#[structopt(short = "l", long, value_name = "LOG_PATTERN")]
pub log: Vec<String>,
/// Disable log color output.
#[structopt(long)]
pub disable_log_color: bool,
/// Disable feature to dynamically update and reload the log filter.
///
/// By default this feature is enabled, however it leads to a small performance decrease.
@@ -99,6 +103,11 @@ impl SharedParams {
&self.log
}
/// Should the log color output be disabled?
pub fn disable_log_color(&self) -> bool {
self.disable_log_color
}
/// Is log reloading disabled
pub fn is_log_filter_reloading_disabled(&self) -> bool {
self.disable_log_reloading