aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/geniza-net.rs7
-rw-r--r--src/bin/geniza-register.rs3
-rw-r--r--src/bin/geniza-sleep.rs3
3 files changed, 11 insertions, 2 deletions
diff --git a/src/bin/geniza-net.rs b/src/bin/geniza-net.rs
index de97e88..1f369ab 100644
--- a/src/bin/geniza-net.rs
+++ b/src/bin/geniza-net.rs
@@ -2,6 +2,7 @@
#[macro_use]
extern crate error_chain;
extern crate clap;
+extern crate env_logger;
extern crate geniza;
// TODO: more careful import
@@ -9,6 +10,8 @@ use geniza::*;
use clap::{App, SubCommand};
fn run() -> Result<()> {
+
+ env_logger::init().unwrap();
let matches = App::new("geniza-net")
.version(env!("CARGO_PKG_VERSION"))
@@ -16,7 +19,7 @@ fn run() -> Result<()> {
.about("Connects to a peer and exchanges handshake")
.arg_from_usage("<host_port> 'peer host:port to connect to'")
.arg_from_usage("<dat_key> 'dat key (public key) to register with'"))
- .subcommand(SubCommand::with_name("clone")
+ .subcommand(SubCommand::with_name("receive-all")
.about("Connects to a peer, pulls all metadata and content")
.arg_from_usage("<host_port> 'peer host:port to connect to'")
.arg_from_usage("<dat_key> 'dat key (public key) to register with'"))
@@ -44,7 +47,7 @@ fn run() -> Result<()> {
false)?;
println!("Done!");
},
- ("clone", Some(subm)) => {
+ ("receive-all", Some(subm)) => {
let host_port = subm.value_of("host_port").unwrap();
let dat_key = subm.value_of("dat_key").unwrap();
if dat_key.len() != 32*2 {
diff --git a/src/bin/geniza-register.rs b/src/bin/geniza-register.rs
index d0f48d8..a328bbc 100644
--- a/src/bin/geniza-register.rs
+++ b/src/bin/geniza-register.rs
@@ -2,6 +2,7 @@
#[macro_use]
extern crate error_chain;
extern crate clap;
+extern crate env_logger;
extern crate geniza;
// TODO: more careful import
@@ -10,6 +11,8 @@ use std::path::Path;
use clap::{App, SubCommand};
fn run() -> Result<()> {
+
+ env_logger::init().unwrap();
let matches = App::new("geniza-register")
.version(env!("CARGO_PKG_VERSION"))
diff --git a/src/bin/geniza-sleep.rs b/src/bin/geniza-sleep.rs
index f8921c7..10fc16b 100644
--- a/src/bin/geniza-sleep.rs
+++ b/src/bin/geniza-sleep.rs
@@ -3,6 +3,7 @@
extern crate error_chain;
#[macro_use]
extern crate clap;
+extern crate env_logger;
extern crate geniza;
// TODO: more careful import
@@ -11,6 +12,8 @@ use std::path::Path;
use clap::{App, SubCommand};
fn run() -> Result<()> {
+
+ env_logger::init().unwrap();
let matches = App::new("geniza-sleep")
.version(env!("CARGO_PKG_VERSION"))