Clean up error reporting

This commit is contained in:
Tony Garnock-Jones 2021-10-07 18:10:59 +02:00
parent 40025b90a6
commit ac6f37cf0c
2 changed files with 3 additions and 4 deletions

View File

@ -66,8 +66,7 @@ fn process_existing_file(
for e in errors { for e in errors {
tracing::error!(path = ?env.path, message = %e); tracing::error!(path = ?env.path, message = %e);
} }
Err(io::Error::new(io::ErrorKind::InvalidData, Ok(None)
format!("Parse of {:?} failed", env.path)))
} }
} }
} }
@ -116,7 +115,7 @@ fn scan_file(
true true
}, },
Err(e) => { Err(e) => {
tracing::debug!("scan_file: {:?}: {:?}", &path, e); tracing::error!("scan_file: {:?}: {:?}", &path, e);
false false
} }
} }

View File

@ -316,7 +316,7 @@ impl TunnelRelay {
Some(ws) => Some(ws) =>
ws.inc_ref(), ws.inc_ref(),
None => { None => {
tracing::warn!( tracing::debug!(
event = ?language().unparse(&P::TurnEvent { oid, event }), event = ?language().unparse(&P::TurnEvent { oid, event }),
"Cannot deliver event: nonexistent oid"); "Cannot deliver event: nonexistent oid");
return Ok(()); return Ok(());