Merge pull request #4266 from nymtech/mixnode-tokio-console
Add tokio-console feature
This commit is contained in:
@@ -35,6 +35,7 @@ serde_json = { workspace = true }
|
||||
sysinfo = "0.27.7"
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "net", "signal"] }
|
||||
tokio-util = { workspace = true, features = ["codec"] }
|
||||
console-subscriber = { version = "0.2", optional = true }
|
||||
toml = "0.5.8"
|
||||
url = { workspace = true, features = ["serde"] }
|
||||
cfg-if = "1.0.0"
|
||||
@@ -83,6 +84,9 @@ cpucycles = [
|
||||
"nym-bin-common/tracing",
|
||||
]
|
||||
|
||||
# build with RUSTFLAGS="--cfg tokio_unstable"
|
||||
tokio-console = ["console-subscriber", "tokio/tracing"]
|
||||
|
||||
[package.metadata.deb]
|
||||
name = "nym-mixnode"
|
||||
maintainer-scripts = "debian"
|
||||
|
||||
@@ -53,6 +53,12 @@ fn test_function() {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(feature = "tokio-console")] {
|
||||
console_subscriber::init();
|
||||
}
|
||||
}
|
||||
|
||||
let args = Cli::parse();
|
||||
setup_env(args.config_env_file.as_ref());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user