improved logging

This commit is contained in:
Svyatoslav Nikolsky 2017-07-27 11:33:09 +03:00
parent dcfb8c1a10
commit c466def1e8

View File

@ -117,7 +117,8 @@ mod server {
None => return Err("self secret is required when using secretstore".into()), None => return Err("self secret is required when using secretstore".into()),
}; };
let mut conf = ethcore_secretstore::ServiceConfiguration { let key_server_name = format!("{}:{}", conf.interface, conf.port);
let mut cconf = ethcore_secretstore::ServiceConfiguration {
listener_address: ethcore_secretstore::NodeAddress { listener_address: ethcore_secretstore::NodeAddress {
address: conf.http_interface.clone(), address: conf.http_interface.clone(),
port: conf.http_port, port: conf.http_port,
@ -137,10 +138,10 @@ mod server {
}, },
}; };
conf.cluster_config.nodes.insert(self_secret.public().clone(), conf.cluster_config.listener_address.clone()); cconf.cluster_config.nodes.insert(self_secret.public().clone(), cconf.cluster_config.listener_address.clone());
let key_server = ethcore_secretstore::start(deps.client, self_secret, conf) let key_server = ethcore_secretstore::start(deps.client, self_secret, cconf)
.map_err(Into::<String>::into)?; .map_err(|e| format!("Error starting KeyServer {}: {}", key_server_name, e))?;
Ok(KeyServer { Ok(KeyServer {
_key_server: key_server, _key_server: key_server,