sc-informant: Respect --disable-log-color (#3009)

Changes `sc-informant` to respect the `--disable-log-color` CLI flag.

Closes: https://github.com/paritytech/polkadot-sdk/issues/2795

---------

Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
This commit is contained in:
Bastian KöcherandMichal Kucharczyk authored and GitHub committed 2024-01-22 10:31:37 +00:00
1 parent d53534c49e
commit deb72f432d
5 files changed
+82 -45

No files matched your search

+3 -3
View File
@@ -27,8 +27,8 @@ use names::{Generator, Name};
use sc_service::{
config::{
BasePath, Configuration, DatabaseSource, KeystoreConfig, NetworkConfiguration,
NodeKeyConfig, OffchainWorkerConfig, PrometheusConfig, PruningMode, Role, RpcMethods,
TelemetryEndpoints, TransactionPoolOptions, WasmExecutionMethod,
NodeKeyConfig, OffchainWorkerConfig, OutputFormat, PrometheusConfig, PruningMode, Role,
RpcMethods, TelemetryEndpoints, TransactionPoolOptions, WasmExecutionMethod,
},
BlocksPruning, ChainSpec, TracingReceiver,
};
@@ -516,7 +516,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
announce_block: self.announce_block()?,
role,
base_path,
informant_output_format: Default::default(),
informant_output_format: OutputFormat { enable_color: !self.disable_log_color()? },
runtime_cache_size,
})
}