Replace eprintln!() by error!()

This commit is contained in:
Roman Zeyde 2018-06-25 22:16:22 +03:00
parent 4a56884da2
commit 8e0a719cee
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,9 @@
extern crate electrs;
extern crate error_chain;
#[macro_use]
extern crate log;
use electrs::{config::Config,
daemon::Daemon,
errors::*,
@ -42,6 +45,6 @@ fn run() -> Result<()> {
fn main() {
if let Err(e) = run() {
eprintln!("{}", e.display_chain());
error!("{}", e.display_chain());
}
}

View File

@ -37,6 +37,6 @@ fn run(config: Config) -> Result<()> {
fn main() {
if let Err(e) = run(Config::from_args()) {
eprintln!("{}", e.display_chain());
error!("{}", e.display_chain());
}
}

View File

@ -1,6 +1,9 @@
extern crate electrs;
extern crate error_chain;
#[macro_use]
extern crate log;
use error_chain::ChainedError;
use std::time::Duration;
@ -48,6 +51,6 @@ fn run_server(config: &Config) -> Result<()> {
fn main() {
let config = Config::from_args();
if let Err(e) = run_server(&config) {
eprintln!("server failed: {}", e.display_chain());
error!("server failed: {}", e.display_chain());
}
}