summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZicklag <zicklag@katharostech.com>2019-10-07 17:53:24 -0500
committerZicklag <zicklag@katharostech.com>2019-10-07 17:53:24 -0500
commitecba102fb7d845a69ebfa72e9204214e135a0010 (patch)
tree565c9fa81ebd6925e78723dbb6d0c5c2c4ee21b5
parent4d8a7ea913f78a7bd257d2a16fc48a1d29a794e1 (diff)
downloadroughenough-ecba102fb7d845a69ebfa72e9204214e135a0010.zip
Print Non-Data Output to Standard Error
This allows you to redirect standard out to a file or a pipe without including the verbose debugging/help messages.
-rw-r--r--src/bin/roughenough-client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/roughenough-client.rs b/src/bin/roughenough-client.rs
index 877e433..dd780f5 100644
--- a/src/bin/roughenough-client.rs
+++ b/src/bin/roughenough-client.rs
@@ -275,7 +275,7 @@ fn main() {
let out = matches.value_of("output");
if verbose {
- println!("Requesting time from: {:?}:{:?}", host, port);
+ eprintln!("Requesting time from: {:?}:{:?}", host, port);
}
let addr = (host, port).to_socket_addrs().unwrap().next().unwrap();
@@ -325,7 +325,7 @@ fn main() {
let verify_str = if verified { "Yes" } else { "No" };
if verbose {
- println!(
+ eprintln!(
"Received time from server: midpoint={:?}, radius={:?}, verified={} (merkle_index={})",
out, radius, verify_str, index
);