mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
Cli: Introduce --detailed-log-output flag (#10278)
* Cli: Introduce `--detailed-log-output` flag If this CLI flag is given, detailed log output will be enabled. This includes the log level, log target ad the thread name. Before this was only enabled when a log level higher than `info` should be logged. * Update client/tracing/src/logging/mod.rs Co-authored-by: David <dvdplm@gmail.com> Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
@@ -49,6 +49,14 @@ pub struct SharedParams {
|
||||
#[structopt(short = "l", long, value_name = "LOG_PATTERN")]
|
||||
pub log: Vec<String>,
|
||||
|
||||
/// Enable detailed log output.
|
||||
///
|
||||
/// This includes displaying the log target, log level and thread name.
|
||||
///
|
||||
/// This is automatically enabled when something is logged with any higher level than `info`.
|
||||
#[structopt(long)]
|
||||
pub detailed_log_output: bool,
|
||||
|
||||
/// Disable log color output.
|
||||
#[structopt(long)]
|
||||
pub disable_log_color: bool,
|
||||
@@ -107,6 +115,11 @@ impl SharedParams {
|
||||
&self.log
|
||||
}
|
||||
|
||||
/// Should the detailed log output be enabled.
|
||||
pub fn detailed_log_output(&self) -> bool {
|
||||
self.detailed_log_output
|
||||
}
|
||||
|
||||
/// Should the log color output be disabled?
|
||||
pub fn disable_log_color(&self) -> bool {
|
||||
self.disable_log_color
|
||||
|
||||
Reference in New Issue
Block a user