Replace eprintln!() by error!()
This commit is contained in:
parent
4a56884da2
commit
8e0a719cee
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user