aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-26 11:22:28 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-26 11:36:30 +0200
commit3e7f766d95a7101681ebadfff9c7eadb18314a25 (patch)
tree60fa91e9eb880273f569f473355eaf8ad8b44a71 /src/garage/cli
parent43e13a501dc00628fbe67ba011649b30ccd4b832 (diff)
downloadgarage-0.4-rc1.tar.gz
garage-0.4-rc1.zip
CLI: default rpc_hostv0.4-rc1
Diffstat (limited to 'src/garage/cli')
-rw-r--r--src/garage/cli/init.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/garage/cli/init.rs b/src/garage/cli/init.rs
index 9eda085f..80283c8f 100644
--- a/src/garage/cli/init.rs
+++ b/src/garage/cli/init.rs
@@ -1,5 +1,7 @@
use std::path::PathBuf;
+use log::warn;
+
use garage_util::error::*;
pub const READ_KEY_ERROR: &str = "Unable to read node key. It will be generated by your garage node the first time is it launched. Ensure that your garage node is currently running. (The node key is supposed to be stored in your metadata directory.)";
@@ -22,11 +24,11 @@ pub fn node_id_command(config_file: PathBuf, quiet: bool) -> Result<(), Error> {
println!("{}", idstr);
if !quiet {
- eprintln!("WARNING: I don't know the public address to reach this node.");
- eprintln!("In all of the instructions below, replace 127.0.0.1:3901 by the appropriate address and port.");
+ warn!("WARNING: I don't know the public address to reach this node.");
+ warn!("In all of the instructions below, replace 127.0.0.1:{} by the appropriate address and port.", config.rpc_bind_addr.port());
}
- format!("{}@127.0.0.1:3901", idstr)
+ format!("{}@127.0.0.1:{}", idstr, config.rpc_bind_addr.port())
};
if !quiet {