task_manager: log stdout/stderr correctly for processes

This commit is contained in:
Jörg Thalheim
2023-10-04 18:14:57 +02:00
parent 876e79d7a6
commit 8d423cc5f1

View File

@@ -49,10 +49,11 @@ class Command:
for fd in rlist:
try:
for line in fd:
self.log.debug("stdout: %s", line)
if fd == self.p.stderr:
self.log.debug(f"[{cmd[0]}] stderr: {line}")
self.stderr.append(line)
else:
self.log.debug(f"[{cmd[0]}] stdout: {line}")
self.stdout.append(line)
self._output.put(line)
except BlockingIOError: