GODT-1893: bridge-gui sends bridge's log to stdout, stderr.

WIP: bridge-gui now parses and self-apply log level from command-line.
WIP: downgraded the log level of gRPC calls to debug.
This commit is contained in:
Xavier Michelon
2022-09-26 10:03:00 +02:00
parent 7a3354f654
commit 653727fd12
13 changed files with 343 additions and 195 deletions

View File

@ -58,11 +58,23 @@ void ProcessMonitor::run()
status_.running = true;
status_.pid = p.processId();
QTextStream out(stdout), err(stderr);
QByteArray array;
while (!p.waitForFinished(100))
{
// we discard output from bridge, it's logged to file on bridge side.
p.readAllStandardError();
p.readAllStandardOutput();
array = p.readAllStandardError();
if (!array.isEmpty())
{
err << array;
err.flush();
}
array = p.readAllStandardOutput();
if (!array.isEmpty())
{
out << array;
out.flush();
}
}
status_.running = false;