mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +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:
@@ -547,6 +547,11 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
||||
Ok(self.shared_params().log_filters().join(","))
|
||||
}
|
||||
|
||||
/// Should the detailed log output be enabled.
|
||||
fn detailed_log_output(&self) -> Result<bool> {
|
||||
Ok(self.shared_params().detailed_log_output())
|
||||
}
|
||||
|
||||
/// Is log reloading enabled?
|
||||
fn enable_log_reloading(&self) -> Result<bool> {
|
||||
Ok(self.shared_params().enable_log_reloading())
|
||||
@@ -568,7 +573,9 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
||||
sp_panic_handler::set(&C::support_url(), &C::impl_version());
|
||||
|
||||
let mut logger = LoggerBuilder::new(self.log_filters()?);
|
||||
logger.with_log_reloading(self.enable_log_reloading()?);
|
||||
logger
|
||||
.with_log_reloading(self.enable_log_reloading()?)
|
||||
.with_detailed_output(self.detailed_log_output()?);
|
||||
|
||||
if let Some(tracing_targets) = self.tracing_targets()? {
|
||||
let tracing_receiver = self.tracing_receiver()?;
|
||||
|
||||
Reference in New Issue
Block a user