Skip to content

Commit

Permalink
Tweak logging of process exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Feb 27, 2023
1 parent ed445be commit 613dfc4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/host/process_launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,24 @@ namespace asynchost
t_end - process.started_at)
.count();

LOG_DEBUG_FMT(
"Host process exited: pid={} status={} runtime={}ms cmd={}",
handle->pid,
exit_status,
runtime_ms,
fmt::join(process.args, " "));
if (exit_status == 0)
{
LOG_INFO_FMT(
"Host process exited: pid={} status={} runtime={}ms cmd={}",
handle->pid,
exit_status,
runtime_ms,
fmt::join(process.args, " "));
}
else
{
LOG_INFO_FMT(
"Host process exited: pid={} status={} runtime={}ms cmd={}",
handle->pid,
exit_status,
runtime_ms,
fmt::join(process.args, " "));
}

running.erase(handle->pid);

Expand Down

0 comments on commit 613dfc4

Please sign in to comment.