add tokio console

This commit is contained in:
John Smith
2022-11-03 11:28:29 -04:00
parent f1bf883376
commit 404f579baa
10 changed files with 221 additions and 11 deletions

View File

@@ -130,8 +130,20 @@ fn do_clap_matches(default_config_path: &OsStr) -> Result<clap::ArgMatches, clap
.value_name("BOOTSTRAP_NODE_LIST")
.help("Specify a list of bootstrap node dialinfos to use"),
)
.arg(
Arg::new("panic")
.long("panic")
.help("panic on ctrl-c instead of graceful shutdown"),
)
;
#[cfg(feature = "rt-tokio")]
let matches = matches.arg(
Arg::new("console")
.long("console")
.help("enable tokio console"),
);
#[cfg(debug_assertions)]
let matches = matches.arg(
Arg::new("wait-for-debug")
@@ -288,6 +300,11 @@ pub fn process_command_line() -> EyreResult<(Settings, ArgMatches)> {
};
settingsrw.core.network.bootstrap_nodes = bootstrap_list;
}
if matches.occurrences_of("console") != 0 {
settingsrw.logging.console.enabled = true;
}
drop(settingsrw);
// Set specific config settings