Instrument tokio console
This commit is contained in:
@@ -55,6 +55,9 @@ validator-client = { path="../common/client-libs/validator-client", features = [
|
||||
version-checker = { path="../common/version-checker" }
|
||||
coconut-interface = { path = "../common/coconut-interface", optional = true }
|
||||
credentials = { path = "../common/credentials", optional = true }
|
||||
# validator-api needs to be built with RUSTFLAGS="--cfg tokio_unstable"
|
||||
console-subscriber = { version = "0.1.1", optional = true}
|
||||
cfg-if = "1.0"
|
||||
|
||||
[features]
|
||||
coconut = ["coconut-interface", "credentials", "gateway-client/coconut"]
|
||||
|
||||
@@ -570,6 +570,11 @@ async fn run_validator_api(matches: ArgMatches<'static>) -> Result<()> {
|
||||
async fn main() -> Result<()> {
|
||||
println!("Starting validator api...");
|
||||
|
||||
cfg_if::cfg_if! {if #[cfg(feature = "console-subscriber")] {
|
||||
// instriment tokio console subscriber needs RUSTFLAGS="--cfg tokio_unstable" at build time
|
||||
console_subscriber::init();
|
||||
}}
|
||||
|
||||
setup_logging();
|
||||
let args = parse_args();
|
||||
run_validator_api(args).await
|
||||
|
||||
Reference in New Issue
Block a user