mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Fix the browser node and ensure it doesn't colour the informant output (#6457)
* Fix browser informant * Fix documentation * Add an informant_output_format function to the cli config * Wrap informant output format in an option * Revert batch verifier * Remove wasm-timer from primitives io cargo lock * Drop informant_output_format function * derive debug for output format
This commit is contained in:
@@ -34,14 +34,37 @@ use parking_lot::Mutex;
|
||||
mod display;
|
||||
|
||||
/// The format to print telemetry output in.
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct OutputFormat {
|
||||
/// Enable color output in logs.
|
||||
/// Enable color output in logs. True by default.
|
||||
pub enable_color: bool,
|
||||
/// Add a prefix before every log line
|
||||
/// Defines the informant's prefix for the logs. An empty string by default.
|
||||
///
|
||||
/// By default substrate will show logs without a prefix. Example:
|
||||
///
|
||||
/// ```text
|
||||
/// 2020-05-28 15:11:06 ✨ Imported #2 (0xc21c…2ca8)
|
||||
/// 2020-05-28 15:11:07 💤 Idle (0 peers), best: #2 (0xc21c…2ca8), finalized #0 (0x7299…e6df), ⬇ 0 ⬆ 0
|
||||
/// ```
|
||||
///
|
||||
/// But you can define a prefix by setting this string. This will output:
|
||||
///
|
||||
/// ```text
|
||||
/// 2020-05-28 15:11:06 ✨ [Prefix] Imported #2 (0xc21c…2ca8)
|
||||
/// 2020-05-28 15:11:07 💤 [Prefix] Idle (0 peers), best: #2 (0xc21c…2ca8), finalized #0 (0x7299…e6df), ⬇ 0 ⬆ 0
|
||||
/// ```
|
||||
pub prefix: String,
|
||||
}
|
||||
|
||||
impl Default for OutputFormat {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enable_color: true,
|
||||
prefix: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Marker trait for a type that implements `TransactionPool` and `MallocSizeOf` on `not(target_os = "unknown")`.
|
||||
#[cfg(target_os = "unknown")]
|
||||
pub trait TransactionPoolAndMaybeMallogSizeOf: TransactionPool {}
|
||||
|
||||
Reference in New Issue
Block a user