demote warnings due to disconnected dispute coordinator (#3672)

* demote warnings due to disconnected dispute coordinator

* cargo fmt

Co-authored-by: Robert Klotzner <robert.klotzner@gmx.at>
This commit is contained in:
Robert Habermeier
2021-08-20 15:01:49 +02:00
committed by GitHub
parent ad0e42537d
commit 9a1b614c47
3 changed files with 6 additions and 2 deletions
@@ -920,7 +920,7 @@ async fn handle_actions(
match confirmation_rx.await {
Err(oneshot::Canceled) => {
tracing::warn!(target: LOG_TARGET, "Dispute coordinator confirmation lost",)
tracing::debug!(target: LOG_TARGET, "Dispute coordinator confirmation lost",)
},
Ok(ImportStatementsResult::ValidImport) => {},
Ok(ImportStatementsResult::InvalidImport) => tracing::warn!(
+1 -1
View File
@@ -901,7 +901,7 @@ impl CandidateBackingJob {
match confirmation_rx.await {
Err(oneshot::Canceled) =>
tracing::warn!(target: LOG_TARGET, "Dispute coordinator confirmation lost",),
tracing::debug!(target: LOG_TARGET, "Dispute coordinator confirmation lost",),
Ok(ImportStatementsResult::ValidImport) => {},
Ok(ImportStatementsResult::InvalidImport) =>
tracing::warn!(target: LOG_TARGET, "Failed to import statements of validity",),
@@ -106,6 +106,10 @@ pub type NonFatalResult<T> = std::result::Result<T, NonFatal>;
pub fn log_error(result: Result<()>) -> std::result::Result<(), Fatal> {
match result {
Err(Error::Fatal(f)) => Err(f),
Err(Error::NonFatal(error @ NonFatal::ImportCanceled(_))) => {
tracing::debug!(target: LOG_TARGET, error = ?error);
Ok(())
},
Err(Error::NonFatal(error)) => {
tracing::warn!(target: LOG_TARGET, error = ?error);
Ok(())