diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-21 00:28:34 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-21 00:28:34 -0400 |
commit | 113ab247310dfc212f1bbd41bb52f51dd7c90b12 (patch) | |
tree | f76cc1e5a561e111d9de2cf7f221bc82d8dee97c | |
parent | f79def94268eeb57d48915bf8dc8c679da0b0457 (diff) | |
download | teleterm-113ab247310dfc212f1bbd41bb52f51dd7c90b12.tar.gz teleterm-113ab247310dfc212f1bbd41bb52f51dd7c90b12.zip |
use log::error! instead of eprintln!
-rw-r--r-- | src/cmd/play.rs | 2 | ||||
-rw-r--r-- | src/cmd/record.rs | 2 | ||||
-rw-r--r-- | src/cmd/server.rs | 4 | ||||
-rw-r--r-- | src/cmd/stream.rs | 2 | ||||
-rw-r--r-- | src/cmd/watch.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 1 |
6 files changed, 7 insertions, 6 deletions
diff --git a/src/cmd/play.rs b/src/cmd/play.rs index 4f8994d..510e7f3 100644 --- a/src/cmd/play.rs +++ b/src/cmd/play.rs @@ -18,7 +18,7 @@ impl crate::config::Config for Config { fn run(&self) -> Result<()> { let fut = PlaySession::new(&self.ttyrec.filename); tokio::run(fut.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); })); Ok(()) } diff --git a/src/cmd/record.rs b/src/cmd/record.rs index 4f3f4dd..746e6a9 100644 --- a/src/cmd/record.rs +++ b/src/cmd/record.rs @@ -28,7 +28,7 @@ impl crate::config::Config for Config { &self.command.args, ); tokio::run(fut.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); })); Ok(()) } diff --git a/src/cmd/server.rs b/src/cmd/server.rs index 86635ee..58e61c4 100644 --- a/src/cmd/server.rs +++ b/src/cmd/server.rs @@ -51,11 +51,11 @@ impl crate::config::Config for Config { }; tokio::run(futures::future::lazy(move || { tokio::spawn(server.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); })); acceptor.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); }) })); Ok(()) diff --git a/src/cmd/stream.rs b/src/cmd/stream.rs index 9555f47..402f6e7 100644 --- a/src/cmd/stream.rs +++ b/src/cmd/stream.rs @@ -82,7 +82,7 @@ impl crate::config::Config for Config { )) }; tokio::run(fut.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); })); Ok(()) } diff --git a/src/cmd/watch.rs b/src/cmd/watch.rs index 6806a0e..202e570 100644 --- a/src/cmd/watch.rs +++ b/src/cmd/watch.rs @@ -76,7 +76,7 @@ impl crate::config::Config for Config { Box::new(WatchSession::new(make_connector, &auth)) }; tokio::run(fut.map_err(|e| { - eprintln!("{}", e); + log::error!("{}", e); })); Ok(()) } diff --git a/src/main.rs b/src/main.rs index ed241d8..2497f07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ fn main() { match crate::cmd::parse().and_then(|m| crate::cmd::run(&m)) { Ok(_) => {} Err(err) => { + // we don't know if the log crate has been initialized yet eprintln!("{}", err); std::process::exit(1); } |