logging actor errors as errors

This commit is contained in:
Falko Richter 2024-07-11 09:25:22 +02:00
parent 95ee4228bd
commit 61c9f68332

View File

@ -71,17 +71,17 @@ impl Actor for Process {
}
}
Ok(retv) => {
tracing::warn!(%name, ?state, code=?retv.status,
tracing::error!(%name, ?state, code=?retv.status,
"Actor returned nonzero exitcode"
);
if !retv.stderr.is_empty() {
let errstr = String::from_utf8_lossy(&retv.stderr);
for line in errstr.lines() {
tracing::warn!(%name, %line, "actor stderr");
tracing::error!(%name, %line, "actor stderr");
}
}
}
Err(error) => tracing::warn!(%name, ?error, "process actor failed to run cmd"),
Err(error) => tracing::error!(%name, ?error, "process actor failed to run cmd"),
}
})
}