From e5bb96715f448c59e1db6482e3dd8b7bd7b6b862 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 21 Jul 2020 23:00:29 +1000 Subject: [PATCH] fix: Reduce sync error logs to info or warn Network issues are very common. --- zebrad/src/commands/start/sync.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/zebrad/src/commands/start/sync.rs b/zebrad/src/commands/start/sync.rs index f0ad32d9b..d865a6d9e 100644 --- a/zebrad/src/commands/start/sync.rs +++ b/zebrad/src/commands/start/sync.rs @@ -169,8 +169,8 @@ where "added hashes to download set" ); } - Ok(r) => tracing::error!("unexpected response {:?}", r), - Err(e) => tracing::error!("{:?}", e), + Ok(r) => tracing::info!("unexpected response {:?}", r), + Err(e) => tracing::info!("{:?}", e), } } @@ -240,8 +240,8 @@ where download_set.extend(hashes); } - Ok(r) => tracing::error!("unexpected response {:?}", r), - Err(e) => tracing::error!("{:?}", e), + Ok(r) => tracing::info!("unexpected response {:?}", r), + Err(e) => tracing::info!("{:?}", e), } } } @@ -320,7 +320,11 @@ where match result_fut.await { Ok(()) => {} - Err(e) => error!("{:?}", e), + // Block validation errors are unexpected, they could + // be a bug in our code. + // + // TODO: log request errors at info level + Err(e) => warn!("{:?}", e), } } .instrument(tracing::Span::current()),