forked from Silverfish/proton-bridge
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user